Image encoding / decoding method and device, and recording medium storing bitstream
The method enhances video encoding and decoding efficiency by employing advanced intra-screen prediction techniques and transform selection for high-resolution video, addressing the cost challenges of high-quality video data transmission and storage.
Patent Information
- Application Number
- PCT/KR2024/003947
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-28
- Filing Date
- 2024-03-28
- Publication Date
- 2024-10-03
AI Technical Summary
The increasing demand for high-resolution, high-quality video data, such as UHD images, leads to higher data volumes, resulting in increased transmission and storage costs, necessitating more efficient video encoding and decoding technologies.
The proposed method improves video encoding and decoding efficiency by using an intra-screen prediction method that determines and utilizes multiple reference samples, including those derived from neural networks and template matching, to enhance intra-picture prediction accuracy, and selects appropriate transform sets and kernels based on prediction modes.
This approach enhances the accuracy of intra-picture prediction, leading to improved coding efficiency and reduced data transmission and storage costs for high-resolution video data.
Smart Images

Figure KR2024003947_03102024_PF_FP_ABST
Abstract
Description
Video encoding / decoding method, device, and recording medium storing bitstream
[0001] The present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream. Specifically, the present invention relates to a video encoding / decoding method and device using an intra-screen prediction method, and a recording medium storing a bitstream.
[0002] Recently, the demand for high-resolution, high-quality images, such as UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image encoding / decoding technologies for higher-resolution and higher-quality images are required.
[0003] Intra-picture prediction is a method for predicting block samples by referencing samples from the same picture. For I-pictures, which lack reference pictures, blocks are encoded / decoded solely through intra-picture prediction, thus significantly improving the accuracy of intra-picture prediction. Therefore, various intra-picture prediction methods are being discussed to improve the accuracy of intra-picture prediction.
[0004] The purpose of the present invention is to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.
[0005] In addition, the present invention aims to provide a recording medium storing a bitstream generated by the image decoding method or device provided in the present invention.
[0006] A video decoding method according to one embodiment of the present invention may include a step of determining an intra-screen prediction mode of a current block, a step of determining a first reference sample of the current block in a reconstructed area, a step of deriving a second reference sample of the current block in an unreconstructed area, and a step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
[0007] According to one embodiment, the second reference sample may be characterized as being derived based on a neural network model that takes as input a sample of the restoration area.
[0008] According to one embodiment, the sample of the input restoration area may be characterized by including at least one of a left restoration sample, an upper restoration sample, an upper left restoration sample, an upper right restoration sample, and a lower left restoration sample of the current block.
[0009] According to one embodiment, the samples of the input restoration area may be characterized by being composed of samples of one or more left columns adjacent to the current block and samples of one or more upper rows.
[0010] According to one embodiment, the second reference sample may be characterized in that it is derived based on surrounding samples of a matching block searched by template matching based on a current template of the current block.
[0011] According to one embodiment, two or more matching blocks are searched for by template matching based on a template of the current block, the second reference sample is determined based on a weighted sum of two or more surrounding samples of corresponding positions of the two or more matching blocks, and a weight used in the weighted sum of the two or more surrounding samples is determined based on a similarity between the reference templates of the two or more matching blocks and the current template.
[0012] According to one embodiment, the second reference sample may be characterized in that it is derived based on a surrounding sample of a matching block in a restoration area indicated by the block vector of the current block.
[0013] According to one embodiment, the second reference sample may be characterized by comprising samples of one or more right columns adjacent to the current block and samples of one or more lower rows.
[0014] According to one embodiment, the step of determining the intra-screen prediction mode of the current block may be characterized in that the intra-screen prediction mode is determined from a predetermined intra-screen prediction mode group, and the predetermined intra-screen prediction mode group includes at least one right-directional intra-screen prediction mode and at least one bottom-directional intra-screen prediction mode.
[0015] According to one embodiment, the predetermined group of intra-screen prediction modes may include at least one left-directional intra-screen prediction mode and at least one upward-directional intra-screen prediction mode, wherein the at least one left-directional intra-screen prediction mode corresponds one-to-one with the at least one right-directional intra-screen prediction mode, and the at least one upward-directional intra-screen prediction mode corresponds one-to-one with the at least one downward-directional intra-screen prediction mode.
[0016] According to one embodiment, the step of determining the intra-screen prediction mode of the current block may be characterized in that, when bidirectional intra-screen prediction is applied to the current block, a first intra-screen prediction mode is selected from at least one left-directional intra-screen prediction mode and at least one upward-directional intra-screen prediction mode of the predetermined intra-screen prediction mode group, and the first intra-screen prediction mode and a second intra-screen prediction mode having a prediction direction opposite to that of the first intra-screen prediction mode are determined as the intra-screen prediction mode of the current block.
[0017] According to one embodiment, the prediction value of the current sample is determined based on a weighted sum of a reference sample of the current sample according to a prediction mode within the first screen and a reference sample of the current sample according to a prediction mode within the second screen, and a weight applied to the weighted sum of the reference samples may be determined by at least one of a position and a prediction direction of the current sample.
[0018] According to one embodiment, the image decoding method may include a step of generating a residual block of the current block by inversely transforming residual data of the current block, and in the inverse transform, a first inverse transform method in which a separable primary inverse transform and a secondary inverse transform are applied or a second inverse transform method in which a non-separable primary inverse transform is applied may be applied.
[0019] According to one embodiment, in the step of generating a residual block of the current block, when the first inverse transform method is applied, for a separable primary inverse transform, a multiple transform set is selected from among a plurality of multiple transform sets according to at least one of a transform size and the intra-screen prediction mode, a transform kernel applied to the separable primary inverse transform is selected from among a plurality of transform kernels of the multiple transform sets, and for a secondary inverse transform, a non-separable transform set is selected from among a plurality of non-separable transform sets according to the intra-screen prediction mode, and a transform kernel applied to the secondary inverse transform is selected from among a plurality of transform kernels of the non-separable transform sets, and the plurality of multiple transform sets may include a multiple transform set corresponding to a rightward directional intra-screen prediction mode and a downward directional intra-screen prediction mode, and the plurality of non-separable transform sets may include a non-separable transform set corresponding to a rightward directional intra-screen prediction mode and a downward directional intra-screen prediction mode.
[0020] According to one embodiment, when the prediction directions of the prediction mode within the first screen and the prediction mode within the second screen are opposite, the multi-transform set and the non-separable transformation set selected when the prediction mode within the first screen is applied to the current block may be the same as the multi-transform set and the non-separable transformation set selected when the prediction mode within the second screen is applied to the current block.
[0021] According to one embodiment, in the step of generating a residual block of the current block, when the second inverse transform method is applied, for a non-separable main inverse transform, a non-separable main transform set is selected from among a plurality of non-separable main transform sets according to at least one of a transform size and the intra-screen prediction mode, and a transform kernel applied to the non-separable main inverse transform is selected from among a plurality of transform kernels of the non-separable main transform sets, and the plurality of non-separable main transform sets may be characterized in that they include a non-separable main transform set corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode.
[0022] According to one embodiment, when the prediction directions of the prediction mode within the first screen and the prediction mode within the second screen are symmetrical to each other, the non-separable main transformation set selected when the prediction mode within the first screen is applied to the current block may be the same as the non-separable main transformation set selected when the prediction mode within the second screen is applied to the current block.
[0023] A video encoding method according to one embodiment of the present invention may include a step of determining an intra-screen prediction mode of a current block, a step of determining a first reference sample of the current block in a reconstructed area, a step of deriving a second reference sample of the current block in an unreconstructed area, and a step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
[0024] A non-transitory computer-readable recording medium according to one embodiment of the present invention stores a bitstream generated by the image encoding method.
[0025] A transmission method according to one embodiment of the present invention transmits a bitstream generated by the image encoding method.
[0026] The features briefly summarized above of the present invention are merely exemplary aspects of the detailed description of the present invention described below and do not limit the scope of the present invention.
[0027] The present invention proposes various embodiments of a method for generating a second reference sample of an unrestored area.
[0028] Additionally, the present invention proposes various embodiments of a method for generating an in-screen prediction block based on an omnidirectional reference sample.
[0029] In addition, the present invention proposes various embodiments of a method for determining a transform set and a transform kernel corresponding to an in-screen prediction mode when an omnidirectional reference sample is supported.
[0030] According to the various embodiments described above, the overall encoding efficiency can be improved as the accuracy of the on-screen prediction is improved.
[0031] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
[0032] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.
[0033] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
[0034] Figure 4 shows an example of the locations of the first reference sample and the second reference sample around the current block.
[0035] FIGS. 5 and 6 are drawings for explaining a neural network-based reference sample derivation method according to one embodiment of the present invention.
[0036] FIG. 7 illustrates an embodiment of a method for searching for a matching block referenced by a current block based on a current template of the current block.
[0037] FIG. 8 illustrates an embodiment of a method for determining a second reference sample referenced by a current block based on template matching.
[0038] Figure 9 illustrates a method for determining a second reference sample based on two reference templates.
[0039] Figure 10 illustrates a method for deriving reference samples based on block vectors.
[0040] Figures 11 and 12 illustrate a unidirectional intra-screen prediction mode based on a first reference sample.
[0041] Figure 13 shows an intra-screen prediction mode that extends the directionality of the intra-screen prediction mode by considering omnidirectional reference samples.
[0042] Fig. 14 illustrates an embodiment of an intra-screen prediction method according to an omnidirectional intra-screen prediction mode.
[0043] Figure 15 illustrates an example of a content streaming system to which an embodiment according to the present invention can be applied.
[0044] A video decoding method according to one embodiment of the present invention may include a step of determining an intra-screen prediction mode of a current block, a step of determining a first reference sample of the current block in a reconstructed area, a step of deriving a second reference sample of the current block in an unreconstructed area, and a step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
[0045] The present invention is susceptible to various modifications and embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and substitutes falling within the spirit and scope of the present invention. In the drawings, similar reference numerals designate the same or similar functions throughout. The shape and size of elements in the drawings may be provided by way of example only for clarity. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different from each other, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not intended to be taken in a limiting sense, and the scope of the illustrative embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.
[0046] In the present invention, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term "and / or" includes a combination of multiple related described items or any of multiple related described items.
[0047] The components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0048] The terminology used herein is merely used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In addition, some components of the present invention are not essential components that perform essential functions in the present invention and may be optional components merely for performance enhancement. The present invention may be implemented by including only components essential to realizing the essence of the present invention, excluding components used only for performance enhancement, and a structure including only essential components, excluding optional components used only for performance enhancement, is also within the scope of the present invention.
[0049] In an embodiment, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In an embodiment, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.
[0050] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of this specification, the detailed description will be omitted. The same reference numerals will be used for identical components in the drawings, and duplicate descriptions of identical components will be omitted.
[0051]
[0052] Glossary of Terms
[0053] Hereinafter, “video” may mean a single picture constituting a video, or may refer to the video itself. For example, “encoding and / or decoding of a video” may mean “encoding and / or decoding of a video,” or may mean “encoding and / or decoding of one of the videos constituting the video.”
[0054] Hereinafter, the terms "video" and "movie" may be used interchangeably and have the same meaning. Furthermore, the target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image input to an encoding device, or an input image input to a decoding device. Here, the target image may have the same meaning as the current image.
[0055] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.
[0056] Hereinafter, the term "target block" may refer to an encoding target block, which is the target of encoding, and / or a decoding target block, which is the target of decoding. Furthermore, the target block may refer to a current block, which is the target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used interchangeably and have the same meaning.
[0057] Hereinafter, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, "unit" may mean including a luminance component block and a corresponding chroma component block to distinguish it from a block. For example, a coding tree unit (CTU) may be composed of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated with it.
[0058] Hereinafter, “sample,” “pixel,” and “pixel” may be used interchangeably and have the same meaning. Here, a sample may represent a basic unit that constitutes a block.
[0059] Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.
[0060] Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.
[0061]
[0062] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
[0063] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device (100) may sequentially encode one or more images.
[0064] Referring to FIG. 1, the encoding device (100) may include an image segmentation unit (110), an intra prediction unit (120), a motion prediction unit (121), a motion compensation unit (122), a switch (115), a subtractor (113), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (117), a filter unit (180), and a reference picture buffer (190).
[0065] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding an input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or can be streamed via a wired / wireless transmission medium.
[0066] The video segmentation unit (110) can segment the input video into various forms to increase the efficiency of video encoding / decoding. That is, the input video is composed of multiple pictures, and one picture can be hierarchically segmented and processed for compression efficiency, parallel processing, etc. For example, one picture can be segmented into one or more tiles or slices, which can then be segmented into multiple Coding Tree Units (CTUs). Alternatively, one picture can first be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can then be segmented into the tiles / slices. Here, the sub-pictures can be utilized to support the function of partially independently encoding / decoding and transmitting the picture. Since multiple sub-pictures can each be individually restored, there is an advantage of easy editing in applications that configure multi-channel input into a single picture. In addition, tiles can be segmented horizontally to generate bricks. Here, a brick can be utilized as the basic unit of intra-picture parallel processing. In addition, one CTU can be recursively split into a quadtree (QT), and the terminal node of the split can be defined as a coding unit (CU). The CU can be split into a prediction unit (PU) and a transformation unit (TU), and prediction and splitting can be performed. Meanwhile, the CU can be utilized as a prediction unit and / or a transformation unit itself. Here, for flexible splitting, each CTU can be recursively split into a multi-type tree (MTT) as well as a quadtree (QT). Splitting of a CTU into a multi-type tree can start from the terminal node of a QT, and the MTT can be composed of a binary tree (BT) and a triple tree (TT).For example, the MTT structure can be divided into vertical binary split mode (SPLIT_BT_VER), horizontal binary split mode (SPLIT_BT_HOR), vertical ternary split mode (SPLIT_TT_VER), and horizontal ternary split mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quad tree of the luminance block during splitting can be set to 16x16, the maximum block size (MaxBtSize) of the binary tree can be set to 128x128, and the maximum block size (MaxTtSize) of the triple tree can be set to 64x64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the triple tree can be set to 4x4, and the maximum depth (MaxMttDepth) of the multi-type tree can be set to 4. Additionally, to improve the encoding efficiency of the I slice, a dual tree can be applied that uses different CTU partition structures for the luminance and chrominance components. On the other hand, in the P and B slices, the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be partitioned into a single tree that shares the coding tree structure.
[0067] The encoding device (100) may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device (100) may perform encoding on the input image in a third mode (e.g., IBC mode, Palette mode, etc.) other than the intra mode and inter mode. However, if the third mode has functional characteristics similar to the intra mode or inter mode, it may be classified as intra mode or inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific description is required.
[0068] When the intra mode is used as the prediction mode, the switch (115) can be switched to intra, and when the inter mode is used as the prediction mode, the switch (115) can be switched to inter. Here, the intra mode can mean the intra prediction mode, and the inter mode can mean the inter-screen prediction mode. The encoding device (100) can generate a prediction block for an input block of an input image. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block using the residual of the input block and the prediction block. The input image can be referred to as a current image that is currently a target of encoding. The input block can be referred to as a current block that is currently a target of encoding or an encoding target block.
[0069] When the prediction mode is intra mode, the intra prediction unit (120) can use samples of blocks already encoded / decoded around the current block as reference samples. The intra prediction unit (120) can perform spatial prediction on the current block using the reference samples, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.
[0070] As an intra prediction method, non-directional prediction modes such as DC mode and Planar mode, as well as directional prediction modes (e.g., 65 directions) can be applied. Here, the intra prediction method can be expressed as an intra prediction mode or an intra prediction mode.
[0071] When the prediction mode is inter mode, the motion prediction unit (121) can search for an area that best matches the input block from the reference image during the motion prediction process and derive a motion vector using the searched area. At this time, the area can be used as a search area. The reference image can be stored in the reference picture buffer (190). Here, when encoding / decoding for the reference image is processed, it can be stored in the reference picture buffer (190).
[0072] The motion compensation unit (122) can generate a prediction block for the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-screen prediction or motion compensation.
[0073] The above motion prediction unit (121) and motion compensation unit (122) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform inter-screen prediction or motion compensation, it is possible to determine whether the motion prediction and motion compensation method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, Advanced Motion Vector Prediction (AMVP) mode, and Intra Block Copy (IBC) mode based on the encoding unit, and perform inter-screen prediction or motion compensation according to each mode.
[0074] In addition, based on the above inter-screen prediction method, the AFFINE mode of sub-PU based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and the GPM (Geometric Partitioning Mode) mode of PU based prediction can be applied. In addition, in order to improve the performance of each mode, the HMVP (History based MVP), the PAMVP (Pairwise Average MVP), the CIIP (Combined Intra / Inter Prediction), the AMVR (Adaptive Motion Vector Resolution), the BDOF (Bi-Directional Optical-Flow), the BCW (Bi-predictive with CU Weights), the LIC (Local Illumination Compensation), the TM (Template Matching), and the OBMC (Overlapped Block Motion Compensation) can be applied.
[0075] The subtractor (113) can generate a residual block using the difference between the input block and the predicted block. The residual block may also be referred to as a residual signal. The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in block units.
[0076] The transform unit (130) can perform a transform on the residual block to generate a transform coefficient and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit (130) may also skip the transform on the residual block.
[0077] Quantized levels can be generated by applying quantization to transform coefficients or residual signals. In the following embodiments, quantized levels may also be referred to as transform coefficients.
[0078] For example, a 4x4 luminance residual block generated through within-screen prediction can be transformed using a basis vector based on DST (Discrete Sine Transform), and the remaining residual blocks can be transformed using a basis vector based on DCT (Discrete Cosine Transform). In addition, through RQT (Residual Quad Tree) technology, the transform block is divided into a quad tree shape for one block, and after performing transformation and quantization on each transform block divided through RQT, a coded block flag (cbf) can be transmitted to increase encoding efficiency when all coefficients become 0.
[0079] Another alternative is to apply Multiple Transform Selection (MTS) technology, which selectively performs transformation using multiple transformation bases. That is, instead of dividing CUs into TUs via RQT, a Sub-block Transform (SBT) technology can perform a function similar to TU division. Specifically, SBT is applied only to inter-screen prediction blocks, and unlike RQT, it can divide the current block into ½ or ¼ blocks vertically or horizontally, and then perform transformation on only one of the blocks. For example, in a vertically divided block, the transformation can be performed on the leftmost or rightmost block, and in a horizontally divided block, the transformation can be performed on the topmost or bottommost block.
[0080] Additionally, LFNST (Low Frequency Non-Separable Transform), a secondary transform technique that further transforms the residual signal converted to the frequency domain through DCT or DST, can be applied. LFNST additionally performs a transform on the low-frequency region of 4x4 or 8x8 in the upper left, which allows the residual coefficients to be concentrated in the upper left.
[0081] The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or residual signal according to a quantization parameter (QP), and can output the generated quantized level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.
[0082] For example, a quantizer with QP values of 0 to 51 can be used. Alternatively, if the image size is larger and high encoding efficiency is required, a QP of 0 to 63 can be used. In addition, a Dependent Quantization (DQ) method that uses two quantizers instead of a single quantizer can be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even without signaling information about the use of a specific quantizer, the quantizer to be used for the next transform coefficient can be selected based on the current state through a state transition model.
[0083] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution on values produced by the quantization unit (140) or coding parameter values produced during the encoding process, and can output the bitstream. The entropy encoding unit (150) can perform entropy encoding on information about image samples and information for decoding the image. For example, the information for decoding the image can include syntax elements, etc.
[0084] When entropy encoding is applied, a small number of bits are allocated to symbols with a high occurrence probability, and a large number of bits are allocated to symbols with a low occurrence probability, thereby representing the symbols, whereby the size of the bit string for the symbols to be encoded can be reduced. The entropy encoding unit (150) can use an encoding method such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding / Code (VLC) table. In addition, the entropy encoding unit (150) may perform arithmetic encoding using the binarization method, probability model, and context model derived from the binarization method of the target symbol and the probability model of the target symbol / bin.
[0085] In this regard, when applying CABAC, the table probability update method can be changed to a simple formula-based table update method to reduce the size of the probability table stored in the decryption device. Furthermore, two different probability models can be used to obtain more accurate symbol probability values.
[0086] The entropy encoding unit (150) can change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level (quantized level).
[0087] Coding parameters may include not only information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, but also information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.
[0088] Here, signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes it in the bitstream, and that the decoder entropy decodes the flag or index from the bitstream.
[0089] The encoded current image can be used as a reference image for other images to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190).
[0090] The quantized level can be dequantized in the dequantization unit (160) and inversely transformed in the inverse transformation unit (170). The dequantized and / or inversely transformed coefficients can be combined with a prediction block through an adder (117), and a reconstructed block can be generated by combining the dequantized and / or inversely transformed coefficients and the prediction block. Here, the dequantized and / or inversely transformed coefficients refer to coefficients on which at least one of dequantization and inverse transformation has been performed, and may refer to a reconstructed residual block. The dequantization unit (160) and the inverse transformation unit (170) can be performed in the reverse process of the quantization unit (140) and the transformation unit (130).
[0091] The restoration block may pass through a filter unit (180). The filter unit (180) may apply a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), a Luma Mapping with Chroma Scaling (LMCS), etc. as a filtering technique, in whole or in part, to the restoration sample, restoration block, or restoration image. The filter unit (180) may also be referred to as an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.
[0092] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. Whether to apply a deblocking filter to the current block can be determined based on the samples contained in several columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.
[0093] Sample adaptive offset can be used to compensate for encoding errors by adding an appropriate offset value to sample values. Sample adaptive offset can compensate for the offset from the original image on a sample-by-sample basis for deblocked images. This can be done by dividing the samples contained in the image into a fixed number of regions, determining the regions to be offset, and applying the offset to those regions. Alternatively, the offset can be applied by considering the edge information of each sample.
[0094] Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.
[0095] An adaptive loop filter can perform filtering based on a comparison between a reconstructed image and the original image. By dividing the samples contained in the image into predetermined groups and determining the filter to be applied to each group, filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied to each block can vary.
[0096] In LMCS (Luma Mapping with Chroma Scaling), luma mapping (LM) refers to remapping luminance values through a piece-wise linear model, and chroma scaling (CS) refers to a technique that scales the residual values of chrominance components according to the average luminance value of the prediction signal. In particular, LMCS can be utilized as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.
[0097] The restored block or restored image that has passed through the filter unit (180) may be stored in the reference picture buffer (190). The restored block that has passed through the filter unit (180) may be a part of the reference image. In other words, the reference image may be a restored image composed of restored blocks that have passed through the filter unit (180). The stored reference image may be used for inter-screen prediction or motion compensation thereafter.
[0098] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.
[0099] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.
[0100] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), a motion compensation unit (250), an adder (201), a switch (203), a filter unit (260), and a reference picture buffer (270).
[0101] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, or a bitstream streamed through a wired / wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in intra mode or inter mode. In addition, the decoding device (200) can generate a restored image or a decoded image through decoding, and can output the restored image or the decoded image.
[0102] If the prediction mode used for decryption is intra mode, the switch (203) can be switched to intra. If the prediction mode used for decryption is inter mode, the switch (203) can be switched to inter.
[0103] The decoding device (200) can decode the input bitstream to obtain a reconstructed residual block and generate a prediction block. Once the reconstructed residual block and the prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.
[0104] The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the reverse process of the entropy encoding method described above.
[0105] The entropy decoding unit (210) can change a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a transform coefficient scanning method to decode a transform coefficient level (quantized level).
[0106] The quantized level can be inversely quantized in the inverse quantization unit (220) and inversely transformed in the inverse transformation unit (230). The quantized level can be generated as a restored residual block as a result of performing inverse quantization and / or inverse transformation. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized level. The inverse quantization unit (220) and inverse transformation unit (230) applied to the decoding device can apply the same technology as the inverse quantization unit (160) and inverse transformation unit (170) applied to the encoding device described above.
[0107] When intra mode is used, the intra prediction unit (240) can generate a predicted block by performing spatial prediction on the current block using sample values of already decoded blocks surrounding the block to be decoded. The intra prediction unit (240) applied to the decoding device can apply the same technology as the intra prediction unit (120) applied to the encoding device described above.
[0108] When the inter mode is used, the motion compensation unit (250) can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) on the current block. The motion compensation unit (250) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform motion compensation, it is possible to determine whether the motion compensation method of the prediction unit included in the corresponding encoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode based on the encoding unit, and motion compensation can be performed according to each mode. The motion compensation unit (250) applied to the decoding device can apply the same technology as the motion compensation unit (122) applied to the encoding device described above.
[0109] The adder (201) can add the restored residual block and the predicted block to generate a restored block. The filter unit (260) can apply at least one of an Inverse-LMCS, a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the restored block or restored image. The filter unit (260) applied to the decoding device can apply the same filtering technology as that applied to the filter unit (180) applied to the encoding device described above.
[0110] The filter unit (260) can output a restored image. The restored block or restored image can be stored in the reference picture buffer (270) and used for inter prediction. The restored block that has passed through the filter unit (260) can be a part of the reference image. In other words, the reference image can be a restored image composed of restored blocks that have passed through the filter unit (260). The stored reference image can be used for inter-screen prediction or motion compensation thereafter.
[0111] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can also be configured in the same manner as the encoding device (100) of FIG. 1 described above.
[0116] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the reception unit (21) of the decoding device (20) via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) can include an element for generating a media file through a predetermined file format and can include an element for transmission via a broadcasting / communication network. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).
[0117] 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). The detailed configuration of the decoding unit (22) can also be configured in the same manner as the decoding device (200) of FIG. 2 described above.
[0118] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.
[0119]
[0120] In the present invention, various embodiments of omni-directional intra-prediction are described. Omni-directional intra-prediction refers to a technique for predicting a current block within the frame using reference samples in all directions surrounding the current block. Considering that encoding and decoding orders are typically raster scan-based, the left and upper reference samples of the current block are typically used for intra-prediction of the current block. However, by deriving the right and lower reference samples of the current block in various ways, intra-prediction modes with only left or upper directionality can be extended to omnidirectional prediction. Therefore, this disclosure discusses methods for deriving right and lower reference samples of the current block, as well as methods for generating intra-prediction blocks using omni-directional reference samples. Furthermore, when omni-directional intra-prediction is introduced, a method for selecting a transform kernel for intra-prediction modes with right or lower directionality needs to be discussed. Therefore, this disclosure discusses a method for selecting a transform kernel for a block to which omni-directional intra-prediction is applied.
[0121]
[0122] Hereinafter, various methods for generating a second reference sample using restored samples around the current block are proposed in FIGS. 4 to 10. Specifically, a method for generating a second reference sample based on a neural network, a method for generating a second reference sample based on template matching (TM), and a method for generating a second reference sample based on motion information are described.
[0123] Figure 4 shows an example of the locations of the first reference sample and the second reference sample around the current block.
[0124] In FIG. 4, the first reference sample may include samples located on the left (L1, L2, L3, L4, BL, L6, L7, L8) (402), the top (A1, A2, A3, A4, AR, A6, A7, A8) (404), and the top left (AL) (406) of the current block (400). And the second reference sample may include samples located on the right (R1, R2, R3, R4) (408), the bottom (B1, B2, B3, B4) (410), and the bottom right (BR) (412) of the current block.
[0125] Figure 4 is an example showing the locations of the first reference sample and the second reference sample. Accordingly, the samples included in the first reference sample and the second reference sample can be determined based on the location of the current block. The number of samples included in the first reference sample and the second reference sample is not limited.
[0126]
[0127] FIGS. 5 and 6 are drawings for explaining a neural network-based reference sample derivation method according to one embodiment of the present invention.
[0128] Referring to FIG. 5, the encoder / decoder can input samples of a restored area (520) around a current block (510) into a neural network processing unit (500) to derive second reference samples of an unrestored area. The second reference samples of the unrestored area can derive lower reference samples (B1-B8, 530), right reference samples (R1-R4, 540), and lower right reference samples (BR, 550).
[0129] Meanwhile, the restored region (520) used as input of the neural network processing unit may include a left sample region (L1 x 2h), an upper sample region (2w x L2), and an upper left sample region (L1 x L2) of the current block. Specifically, the number of restored samples used as input of the neural network processing unit may be (L1 x 2h) + (2w x L2) + (L1 x L2). As another example, the number of restored samples used as input of the neural network processing unit may be (L1 xh) + (w x L2) + (L1 x L2). L1 represents the left width of the restored region (520), and L2 represents the upper width of the restored region (520).
[0130] Meanwhile, the size of the restored region (520) may be determined based on signaling information. For example, the sizes of L1 and L2 may be transmitted from the encoder to the decoder as a predetermined syntax element. Alternatively, the sizes of L1 and L2 may be determined by considering the size, color components, shape, etc. of the current block (510). Alternatively, the sizes of L1 and L2 may have fixed values.
[0131] In the case of Fig. 5, only one row of samples at the bottom and one column at the right are generated by the neural network processing unit. However, as in Fig. 6, two or more rows or columns of right reference samples, bottom reference samples, and bottom-right reference samples can be generated.
[0132] Referring to FIG. 6, the encoder / decoder can input samples of the restored region (620) around the current block (610) into the neural network processing unit (600) to derive samples of the unrestored region (630). The number of samples of the unrestored region (630) may be (w x N) + (M x h) + (M x N). Here, L1 represents the left width of the restored region (620), L2 represents the top width of the restored region (620), M represents the right width of the unrestored region (630), and N represents the bottom width of the unrestored region (630).
[0133] Meanwhile, the size of the unrestored region (630), which is the output of the neural network processing unit, may be determined based on signaling information. For example, the sizes of M and N may be transmitted from the encoder to the decoder as a predetermined syntax element. Alternatively, the sizes of M and N may be determined by considering the size, color components, shape, etc. of the current block (610). Alternatively, the sizes of M and N may have fixed values.
[0134] The neural network processing unit can be implemented as a neural network model. Here, the artificial neural network model can represent a deep neural network including one or more neural network layers. Furthermore, the neural network model can include all or some of the following: convolutional layers, fully-connected layers, and pooling layers. The neural network model can be implemented as a form including a single type of neural network layer, or can additionally be implemented as a form combining different types of layers.
[0135] Meanwhile, the initial internal parameters of the neural network model used in the neural network processing unit are pre-learned, but can be additionally learned during the encoding / decoding process.
[0136]
[0137] Figures 7 to 9 are diagrams for explaining a method for deriving a reference sample based on template matching according to an embodiment of the present invention. The template matching-based intra prediction (Intra Template Matching Prediction, Intra TMP) method refers to a method for searching for an optimal prediction block in a restored area of a current picture using template matching and copying it to generate a prediction block of the current block.
[0138]
[0139] FIG. 7 illustrates an embodiment of a method for searching for a matching block referenced by a current block based on a current template of the current block.
[0140] Referring to FIG. 7, the neighboring ┌ area (i.e., the left, top, and upper left areas) of the current block (710) can be defined as the current template (720). Then, the reference template (730) most similar to the current template (720) can be searched within the predefined search range (R1, R2, R3, R4) of the reconstructed area of the current picture (700). Then, based on the reference template (730), the matching block (740) to be referenced by the current block (710) is determined.
[0141] The predefined search ranges R1, R2, R3, and R4 can be defined as the current CTU (Coding Tree Unit) including the current block, the upper left CTU, the upper CTU, and the left CTU, respectively. In addition, the predefined search ranges can be searched for reference templates based on a predefined search order. For example, the reference templates can be searched in a zigzag order of R1, R4, R3, and R2. Meanwhile, information about the search ranges can be determined by the encoder and transmitted to the decoder.
[0142] The size and shape of the current template (720) of the current block (710) can be arbitrarily determined. For example, the current template (720) may include both the left restoration area and the upper restoration area of the current block (710). Additionally, the current template (720) may include only the upper restoration area or the left restoration area of the current block (710). Information regarding the size and shape of the current template may be determined by the encoder and transmitted to the decoder.
[0143] Additionally, the top width T1 and the left width T2 of the current template (720) may be determined by the encoder and transmitted to the decoder. Alternatively, T1 and T2 may be determined by the size, color components, and shape of the current block. Alternatively, T1 and T2 may have fixed values regardless of the current block.
[0144]
[0145] FIG. 8 illustrates an embodiment of a method for determining a second reference sample referenced by a current block based on template matching.
[0146] First, similar to FIG. 7, a reference template (830) is searched based on the current template (820). In FIG. 7, a corresponding matching block (740) is determined from the reference template (730), whereas in FIG. 8, a corresponding matching reference sample (850) is determined from the reference template (830). Then, second reference samples of the second reference sample area (860) of the current block (810) are determined from the matching reference sample (850).
[0147] The matching reference sample (850) includes the right reference sample, the bottom reference sample, and the bottom right reference sample of the matching block (840). And the second reference sample area (860) includes the right reference sample, the bottom reference sample, and the bottom right reference sample of the current block (810).
[0148] Additionally, the size of the second reference sample area is (w x L2) + (L1 x h) + (L1 x L2). Here, w and h represent the width and height of the current block, and L1 and L2 represent the top width and left width of the second reference sample area. w, h, L1, and L2 are arbitrary positive numbers. L1 and L2 can be determined based on the size, color components, and shape of the current block. Alternatively, L1 and L2 can be determined in the encoder and transmitted to the decoder. Alternatively, L1 and L2 can be fixed values.
[0149] In FIG. 8, a second reference sample (860) is determined using one reference template (830). However, according to an embodiment, the second reference sample (860) may be determined by synthesizing matching reference samples from N templates, where N is an arbitrary positive integer greater than or equal to 2.
[0150]
[0151] Figure 9 illustrates a method for determining a second reference sample based on two reference templates.
[0152] According to FIG. 9, a first reference template (902) and a second reference template (912) corresponding to the current template of the current block are searched. Then, a first matching reference sample (904) is derived from the first reference template (902), and a second matching reference sample (914) is derived from the second reference template (912). Then, the first matching reference sample (904) and the second matching reference sample (914) are weighted to determine the second reference sample of the current block. By determining the second reference sample of the current block based on two or more reference templates, the accuracy of the second reference sample of the current block can be improved.
[0153] At this time, weights w1 and w2 in the weighted sum are applied to the first matching reference sample (904) and the second matching reference sample (914), respectively. Here, 0 ≤ w1 ≤ 1, 0 ≤ w2 ≤ 1, and w-1 + w-2 = 1 is satisfied. w1 and w2 may be transmitted from the encoder or may be fixed values. Alternatively, w1 and w2 may be determined based on the similarity between the first reference template (902) and the current template and the similarity between the second reference template (912) and the current template. For example, a high weight may be assigned to a matching reference template of a matching block having a high similarity.
[0154] According to the above-described method for generating a second reference sample based on template matching, a second reference sample can be generated by performing the same template matching process in the decoder as in the encoder, without transmitting / parsing syntax related to generating the second reference sample.
[0155]
[0156] Figure 10 illustrates a method for deriving reference samples based on block vectors.
[0157] The block vector-based reference sample derivation method described in Fig. 10 derives a second reference sample by transmitting / parsing syntax related to a block vector, unlike the template matching-based reference sample derivation method described above.
[0158] In FIG. 10, a matching block (1030) most similar to the current block is searched within a predefined search range (R1, R2, R3, R4) in a restored area using a block vector (1050) of the current block (1020). Alternatively, a matching block (1030) most similar to the current block may be searched in an area outside the predefined search range using the block vector (1050) of the current block (1020). Then, a second reference sample (1010) of the current block (1020) may be determined from a matching reference sample (1040) of the determined matching block (1030).
[0159] At this time, the size of the second reference sample area is (w x L2) + (L1 x h) + (L1 x L2). Here, w and h represent the width and height of the current block, and L1 and L2 represent the top width and left width of the second reference sample area. w, h, L1, and L2 are arbitrary positive numbers. L1 and L2 can be determined based on the size, color components, and shape of the current block. Alternatively, L1 and L2 can be determined in the encoder and transmitted to the decoder. Alternatively, L1 and L2 can be fixed values.
[0160]
[0161] Hereinafter, based on FIGS. 11 to 13, a method for generating a prediction block within a screen based on a first reference sample and the generated second reference sample is described.
[0162]
[0163] Figures 11 and 12 illustrate a unidirectional intra prediction mode based on first reference samples (a left reference sample, an upper reference sample, and an upper-left reference sample). According to the unidirectional intra prediction mode of Figures 11 and 12, the current block is predicted based on the first reference samples of the left, upper, and upper-left. Therefore, the unidirectional intra prediction mode is composed of prediction modes of the directions left, upper, upper-left, upper-right, and lower-left. The intra prediction mode group of Figure 11 includes a total of 33 directional intra prediction modes of the left or upper direction. The intra prediction mode group of Figure 12 includes a total of 65 directional intra prediction modes of the left or upper direction.
[0164] As previously explained, the current block can be predicted by additionally referencing the second reference samples (the right reference sample, the bottom reference sample, and the bottom-right reference sample). This allows the directionality of the prediction mode within the screen to be extended to the right, bottom, and bottom-right directions.
[0165]
[0166] Figure 13 shows an intra-screen prediction mode that extends the directionality of the intra-screen prediction mode by considering omnidirectional reference samples (first reference sample and second reference sample).
[0167] In Fig. 13, the omni-directional intra-prediction mode can include intra-prediction modes in the left, top, and top-left directions, as well as the right, bottom, and bottom-right directions. Therefore, unlike the intra-prediction modes of Figs. 11 and 12, the intra-prediction mode can be expanded in all directions as shown in Fig. 13.
[0168] Figure 13 shows an example of omnidirectional expansion of the on-screen prediction modes of 2M-2 (Planar mode, DC mode, mode 2, …, mode 2M-3), where M is any positive integer.
[0169] If the omnidirectional intra-screen prediction mode proposed in Fig. 13 is applied to the 35 intra-screen prediction modes of Fig. 11, the number of intra-screen prediction modes can be 65. If the omnidirectional intra-screen prediction mode proposed in Fig. 13 is applied to the 67 intra-screen prediction modes of Fig. 12, the number of intra-screen prediction modes can be 129. This method can be used to extend any N intra-screen prediction modes omnidirectionally, as an example, where N is any positive integer.
[0170] Accordingly, the intra-screen prediction mode of the current block can be determined from a group of intra-screen prediction modes including at least one right-directional intra-screen prediction mode, at least one downward-directional intra-screen prediction mode, at least one left-directional intra-screen prediction mode, and at least one upward-directional intra-screen prediction mode. In the intra-screen prediction mode group, at least one left-directional intra-screen prediction mode can be set to correspond one-to-one with at least one right-directional intra-screen prediction mode, and at least one upward-directional intra-screen prediction mode can be set to correspond one-to-one with at least one downward-directional intra-screen prediction mode. Here, a one-to-one correspondence can be established between two directional intra-screen prediction modes having opposite prediction directions. In addition, the left-directional intra-screen prediction mode means a mode in which the prediction direction is closer to the left direction, the upward-directional intra-screen prediction mode means a mode in which the prediction direction is closer to the upward direction, the right-directional intra-screen prediction mode means a mode in which the prediction direction is closer to the right direction, and the downward-directional intra-screen prediction mode means a mode in which the prediction direction is closer to the downward direction.
[0171] The angular difference in the prediction directions of the prediction modes within adjacent screens in FIG. 13 may be nonuniform. However, according to an embodiment, the angular difference in the prediction directions of the prediction modes within adjacent screens may be set to be uniform.
[0172] The unidirectional intra-screen prediction according to the intra-screen prediction mode of FIGS. 11 and 12 generates a prediction block by copying the values of the first reference sample (the left reference sample, the top reference sample, and the top-left reference sample) according to the directionality of the intra-screen prediction mode of FIGS. 11 and 12. On the other hand, the unidirectional intra-screen prediction according to FIG. 13 can refer to not only the first reference sample but also the second reference sample (the right reference sample, the bottom reference sample, and the bottom-right reference sample) according to the prediction direction. That is, a prediction block can be generated by copying the values of the omnidirectional reference samples according to the directionality of the omnidirectional intra-screen prediction mode of FIG. 13. The proposed unidirectional intra-screen prediction method using omnidirectional reference samples is identical to the existing unidirectional intra-screen prediction method that generates an intra-screen prediction block according to the directionality of the intra-screen prediction mode.
[0173] Unidirectional intra prediction using only the first reference sample has the problem of low prediction accuracy for current samples located far from the reconstructed reference sample. However, unidirectional intra prediction using the first and second reference samples can improve the prediction accuracy for current samples located far from the reconstructed reference sample.
[0174] In addition to unidirectional intra-screen prediction, the current block can be predicted based on bidirectional intra-screen prediction by referring to both the first reference sample at the left, top, and upper-left corners and the second reference sample at the right, bottom, and lower-right corners. By referring to both the first and second reference samples according to bidirectional intra-screen prediction, the prediction accuracy of the current sample that is far from the reconstructed reference sample can be further improved. By bidirectional intra-screen prediction, two reference samples located in opposite directions can be referred to, and the current sample can be predicted based on the weighted sum of the two reference samples. At this time, the weights used in the weighted sum of the two reference samples can be determined based on the position of the current sample, the prediction direction, etc.
[0175]
[0176] Below, a method for determining a transform kernel for the current block based on the omnidirectional intra-screen prediction mode described above is described. First, a method for determining a transform kernel for the current block when a separable primary transform and a secondary transform are applied is described. Next, a method for determining a transform kernel for the current block when a non-separable primary transform is applied is described.
[0177]
[0178] Below, a method for determining the transform kernel of the primary transform and the transform kernel of the secondary transform for the prediction mode within the omnidirectional screen is described.
[0179] In Fig. 13, intra-screen prediction modes for the prediction direction referring to the second reference samples (the right reference sample, the bottom reference sample, and the bottom right reference sample) are introduced. Modes M+1 to 2M-3 in Fig. 13 are new intra-screen prediction modes based on the second reference sample. Therefore, the method for determining the transform kernel of the separate primary transform and the transform kernel of the secondary transform for modes M+1 to 2M-3 is described below.
[0180] First, the method for determining the transform kernel of the separable primary transform and the transform kernel of the secondary transform for modes M+1 to 2M-3 is explained. In the separable primary transform, separable kernels in the horizontal and vertical directions are used. The separable primary transform can use various transform kernels, such as the Discrete Cosine Transform (DCT) Type 2, DST Type 7, DCT Type 8, DCT Type 5, DST Type 4, DST Type 1, and IDT (Identity Transform).
[0181] In the separable main transform, multiple transform sets and / or transform kernels can be determined based on the transform unit size (TU size) and the prediction mode information within the screen. At this time, the transform sets and / or transform kernels can be determined based on at least one of various pieces of information, such as the width, height, area, aspect ratio of the current block, the prediction mode information within the screen, whether a secondary transform is used, a quantization parameter (QP), statistical characteristics of surrounding pixels, and explicitly signaled syntax elements. In consideration of this, the omnidirectional prediction mode of FIG. 13 can be configured to be grouped into N transform sets, and each set includes K transform kernels. Here, N and K are positive integers satisfying 1 ≤ N ≤ 2M-2 and 1 ≤ K, respectively.
[0182] At this time, the transformation kernels of the separated main transformation for the newly generated M+1 mode to 2M-3 mode in the right, bottom, and bottom right directions of Fig. 13 can be generated through offline training and applied to the encoder and decoder. Alternatively, appropriate transformation kernels can be derived for each encoder and decoder, reflecting the diversity of content within the video.
[0183] Alternatively, predefined transformation kernels may be categorized into several categories. And, a syntax element indicating which transformation kernels corresponding to which list are to be used may be transmitted at a high level or a low level. Or, a transformation kernel of a predetermined separate main transformation may be used depending on at least one of a transformation size and an intra-screen prediction mode. Here, the high level includes a sequence parameter set, a picture parameter set, a video parameter set, an adaptation parameter set, a picture header, a slice header, etc. And the low level includes a coding tree unit, a coding unit, a transform unit, etc.
[0184] According to one embodiment, the kernel used in modes 2 through M may be applied to modes M+1 through 2M-3 of FIG. 13. For example, the same transform kernel may be configured to be used between prediction modes within a screen with opposite prediction directions. For example, the same transform kernel may be configured to be used between modes 3 and M+1 of FIG. 13.
[0185] The multiple transformation sets and / or transformation kernels of the separable primary transformation can be determined using either an explicit or implicit method. According to the explicit method, the prediction modes within the omnidirectional screen are grouped into N transformation sets. And K transformation kernels can be used for each transformation set. Therefore, the transformation sets and / or transformation kernels can be selected by transmitting / parsing the indices of the transformation sets and / or transformation kernels for the current block.
[0186] The implicit method can implicitly derive the transform set and transform kernel information for the current block in the encoder or decoder. That is, the transform kernel for the separable primary transform can be implicitly derived using at least one of the following information: the width, height, area, aspect ratio, intra-screen prediction mode information, whether a secondary transform is used, quantization parameters, surrounding pixels of the current block, and other information about the current block.
[0187] The secondary transform is performed on the low-frequency coefficients among the primary transform coefficients generated by the separable primary transform. In this case, the secondary transform uses a non-separable kernel, unlike the separable primary transform that uses separable kernels in the horizontal and vertical directions. Therefore, the secondary transform is called a low-frequency non-separable transform (LFNST).
[0188] The transform set and / or transform kernel of the low-frequency non-separable transform can be determined based on information of the prediction mode within the screen. At this time, the transform set and / or transform kernel can be determined based on at least one of the width, height, area, aspect ratio of the current block, the prediction mode information within the screen, the quantization parameter, the statistical characteristics of the surrounding pixels, the explicitly signaled syntax elements, etc. In consideration of this, the omnidirectional prediction mode of FIG. 13 can be grouped into S transform sets, and each transform set can be configured to include T transform kernels. Here, S and T are positive integers satisfying 1 ≤ S ≤ 2M-2 and 1 ≤ T, respectively.
[0189] At this time, the transformation kernels for the second transformation for the newly generated M+1 mode to 2M-3 mode in the right, bottom, and bottom right directions of Fig. 13 can be generated through offline training and applied to the encoder and decoder. Alternatively, appropriate kernels can be derived for the encoder and decoder respectively, reflecting the diversity of content within the video. Alternatively, predefined transformation kernels can be classified into several lists (categories). In addition, syntax elements indicating which kernels for which list are to be used can be transmitted at the high or low level.
[0190] According to one embodiment, the kernel used in modes 2 through M may be applied to modes M+1 through 2M-3 of FIG. 13. For example, the same transformation kernel may be configured to be used between prediction modes within a screen with opposite prediction directions. For example, the same transformation kernel may be configured to be used between modes 3 and M+1 of FIG. 13.
[0191] The non-separable transform sets and / or transform kernels of the second transform can be determined using either an explicit or implicit method. According to the explicit method, the prediction modes within the omnidirectional screen are grouped into S transform sets. And T transform kernels can be used for each transform set. Therefore, the transform sets and / or transform kernels can be selected by transmitting / parsing the indices of the transform sets and / or transform kernels for the current block.
[0192] The implicit method can implicitly derive information about a set of transformations and transformation kernels for the current block in the encoder or decoder. That is, the transformation kernel for the secondary transformation can be implicitly derived using at least one of the following information: the width, height, area, aspect ratio, within-screen prediction mode information, whether a secondary transformation is used, quantization parameters, surrounding pixels of the current block, and other information about the current block.
[0193]
[0194] Below, a method for determining the transform kernel of the primary transform and the transform kernel of the secondary transform by considering the directionality of the prediction mode within the screen is described.
[0195] According to FIG. 13, the intra-screen prediction modes can include two non-directional intra-screen prediction modes (Planar mode and DC mode) and 2M-4 directional intra-screen prediction modes, where M is any positive integer. Except for the two non-directional intra-screen prediction modes, the remaining 2M-4 directional intra-screen prediction modes can have the same directionality. That is, as shown in FIG. 13, mode 2 and mode M, mode 3 and mode M+1, and mode M-1 and mode 2M-3 have the same directionality. Considering the characteristics of the intra-screen prediction modes, the transform sets and / or transform kernels of the separate primary transform and secondary transform can be determined.
[0196] Multiple transformation sets and / or transformation kernels of the main transformation can be determined using any of the explicit and implicit methods. According to the explicit method, the omnidirectional intra-picture prediction modes are grouped into N transformation sets. And K transformation kernels can be used for each transformation set. Therefore, the transformation set and / or transformation kernel can be selected by transmitting / parsing the index of the transformation set and / or transformation kernel for the current block. In addition, considering the directionality of the intra-picture prediction mode, the same transformation set and / or transformation kernel can be applied to a pair of intra-picture prediction modes (mode X, mode X+(M-2)) having the same directionality. In this case, N and K are positive integers satisfying 1 ≤ N ≤ (2M-4) / 2 and 1 ≤ K, respectively.
[0197] The implicit method can implicitly derive the transform set and transform kernel information for the current block in the encoder or decoder. That is, the transform kernel for the separable primary transform can be implicitly derived using at least one of the following information: the width, height, area, aspect ratio, intra-screen prediction mode information, whether a secondary transform is used, quantization parameters, surrounding pixels of the current block, and other information about the current block.
[0198] The non-separable transformation sets and / or transformation kernels of the secondary transform can be determined using any of the explicit and implicit methods. According to the explicit method, the omnidirectional intra-picture prediction modes are grouped into S transformation sets. And T transformation kernels can be used for each transformation set. Therefore, the transformation sets and / or transformation kernels can be selected by transmitting / parsing the indices of the transformation sets and / or transformation kernels for the current block. In addition, considering the directionality of the intra-picture prediction modes, the same transformation set and / or transformation kernel can be applied to a pair of intra-picture prediction modes (mode X, mode X+(M-2)) having the same directionality. In this case, S and T are positive integers satisfying 1 ≤ S ≤ (2M-4) / 2 and 1 ≤ T, respectively.
[0199] The implicit method can implicitly derive information about a set of transformations and transformation kernels for the current block in the encoder or decoder. That is, the transformation kernel for the secondary transformation can be implicitly derived using at least one of the following information: the width, height, area, aspect ratio, within-screen prediction mode information, whether a secondary transformation is used, quantization parameters, surrounding pixels of the current block, and other information about the current block.
[0200]
[0201] Below, a method for determining the transform kernel of a non-separable main transform for an omnidirectional screen-in-prediction mode is described.
[0202] In the non-separable main transform, a non-separable kernel is used instead of the horizontal and vertical separable kernels, similar to the low-frequency non-separable transform (LFNST). In the non-separable main transform, the set of transforms and / or the transform kernels can be determined based on the prediction mode information within the screen.
[0203] In Fig. 13, intra-screen prediction modes for the prediction direction referring to the second reference sample (the right reference sample, the bottom reference sample, and the bottom-right reference sample) are introduced. Modes M+1 to 2M-3 in Fig. 13 are new intra-screen prediction modes based on the second reference sample. Therefore, a method for determining the transform kernel of the non-separable main transform for modes M+1 to 2M-3 is described below.
[0204]
[0205] In a non-separable primary transform (NSPT), a transform set and / or a transform kernel can be determined based on the transform size and the within-screen prediction mode information. At this time, the transform set and / or the transform kernel can be determined based on at least one of various pieces of information, such as the width, height, area, aspect ratio of the current block, within-screen prediction mode information, whether a secondary transform is used, quantization parameters, statistical characteristics of surrounding pixels, and explicitly signaled syntax elements. In consideration of this, the omnidirectional within-screen prediction mode of FIG. 13 can be configured to be grouped into N transform sets, and each set can include K transform kernels, where N and K are positive integers satisfying 1 ≤ N ≤ 2M-2 and 1 ≤ K, respectively.
[0206] At this time, the transformation kernels of the separating main transformation for the newly generated M+1 mode to 2M-3 mode in the right, bottom, and bottom-right directions of Fig. 13 can be generated through offline training and applied to the encoder and decoder. Alternatively, appropriate kernels can be derived for each encoder and decoder, reflecting the diversity of content within the image.
[0207] Alternatively, predefined transformation kernels can be categorized into multiple categories. Syntax elements indicating which transformation kernels from which list to use can be transmitted at either the high or low levels. Alternatively, a transformation kernel for a predetermined non-separable primary transformation can be used based on the prediction mode within the screen.
[0208] The multiple transformation sets and / or transformation kernels of the non-separable primary transformation can be determined using either an explicit or implicit method. According to the explicit method, the prediction modes within the omnidirectional screen are grouped into N transformation sets. And K transformation kernels can be used for each transformation set. Therefore, the transformation sets and / or transformation kernels can be selected by transmitting / parsing the indices of the transformation sets and / or transformation kernels for the current block.
[0209] The implicit method can implicitly derive the transform set and transform kernel information for the current block in the encoder or decoder. That is, the transform kernel for the non-separable main transform can be implicitly derived using at least one of the following information: the width, height, area, aspect ratio, intra-screen prediction mode information, whether a secondary transform is used, quantization parameters, surrounding pixels of the current block, and other information about the current block.
[0210]
[0211] Below, a method for determining the transform kernel of a non-separable main transform by considering the symmetry of the prediction mode within the screen is described.
[0212] According to FIG. 13, the intra-screen prediction modes can include two non-directional intra-screen prediction modes (Planar mode and DC mode) and 2M-4 directional intra-screen prediction modes, where M is any positive integer. Except for the two non-directional intra-screen prediction modes, the remaining 2M-4 directional intra-screen prediction modes can have symmetry with respect to the M / 2+1 mode (the prediction mode in the upper-left prediction direction). That is, as shown in FIG. 13, mode 3 and mode M-1, and mode 2M-3 and mode M+1 have symmetry with respect to each other. For example, when M is 66, mode 2 and mode 66, mode 18 and mode 50, etc. can have symmetry with respect to each other. Considering the characteristics of the intra-screen prediction modes, a transform set and / or a transform kernel of a non-separable main transform can be determined.
[0213] To determine the transform set and / or transform kernel of the non-separable main transform, the omnidirectional intra-picture prediction modes are grouped into N transform sets. And K transform kernels can be used within each transform set. Therefore, the transform set and / or transform kernel can be selected by transmitting / parsing the index of the transform set and / or transform kernel for the current block. In addition, considering the symmetry of the intra-picture prediction modes, the same transform set and / or transform kernel can be applied to a pair of intra-picture prediction modes that are symmetrical around the M / 2+1 mode. In this case, N and K are positive integers satisfying 1 ≤ N ≤ (2M-4) / 2 and 1 ≤ K, respectively.
[0214] When a prediction mode symmetrical around the M / 2+1 prediction mode is applied to the current block, a transformation kernel is applied to the transposed input data. Transposing input data expressed as a two-dimensional matrix means constructing NxM two-dimensional block data with rows and columns swapped from two-dimensional block data of size MxN (M, a positive integer where N ≥ 2). For example, if the data arrangement order (the order when arranging two-dimensional data into one dimension for the main transformation) for constructing a one-dimensional input vector for the 2M-3 mode is row-major, the data arrangement order of the M+1 mode, which is symmetrical to the 2M-3 mode, is column-major. Conversely, if the data arrangement order for constructing a one-dimensional input vector for the 2M-3 mode is column-major, the data arrangement order of the M+1 mode, which is symmetrical to the 2M-3 mode, is row-major. This data arrangement order is also performed in the inverse transformation of the non-separable main transformation. The prediction direction of M / 2+1 and 3M / 2-1 modes is midway between the horizontal and vertical directions. Therefore, when M / 2+1 or 3M / 2-1 modes are applied to the current block, the two-dimensional block data can be aligned into a one-dimensional input vector by selecting either the row-major or column-major orientation.
[0215] For example, when M is 66, mode 82 and mode 114 may be symmetrical to each other. Mode 82 and mode 114 may correspond to the same set of transformations and / or transformation kernels. When transforming the current block to which mode 82 is applied, the two-dimensional input data may be sorted into a one-dimensional input vector in the row-major direction, and a transformation kernel may be applied to the sorted one-dimensional input vector. And when transforming the current block to which mode 114 is applied, the two-dimensional input data may be sorted into a one-dimensional input vector in the column-major direction, and a transformation kernel may be applied to the sorted one-dimensional input vector.
[0216] If the current block is a non-square block, the symmetry of a square block cannot be applied. Therefore, not only the prediction mode within the screen, but also the symmetry of block shapes that are in a transpose relationship can be applied so that the 2D block data can be aligned to a 1D input vector. For example, the WxH block with mode 2 in Fig. 13 and the HxW block with mode M can be applied to the same set of transformations and / or transformation kernels because they are symmetrical to each other. Here, W and H are different positive integers (W ≠ H).
[0217] For example, for a WxH block with mode 2, a 1-dimensional input vector can be constructed by sorting the 2-dimensional input data according to a predetermined sorting order (e.g., row-major order or column-major order). And for an HxW block with mode M, a 1-dimensional input vector can be constructed by sorting the 2-dimensional input data according to a sorting order opposite to the sorting order applied to the WxH block. And a non-separable main transform can be applied to the 1-dimensional input vector of the WxH block with mode 2 and the 1-dimensional input vector of the HxW block with mode M according to the same set of transformations and / or transformation kernels. This arrangement order is also performed in the inverse transform of the non-separable main transform.
[0218]
[0219] Fig. 14 illustrates an embodiment of an intra-screen prediction method according to an omnidirectional intra-screen prediction mode.
[0220] At step 1402, the on-screen prediction mode of the current block is determined.
[0221] According to one embodiment, the intra-screen prediction mode of the current block may be determined from a predetermined intra-screen prediction mode group. The predetermined intra-screen prediction mode group may include at least one left-directional intra-screen prediction mode, at least one upward-directional intra-screen prediction mode, at least one right-directional intra-screen prediction mode, and at least one downward-directional intra-screen prediction mode.
[0222] In one embodiment, at least one left-facing intra-screen prediction mode may correspond one-to-one with at least one right-facing intra-screen prediction mode. Additionally, at least one upward-facing intra-screen prediction mode may correspond one-to-one with at least one downward-facing intra-screen prediction mode.
[0223] According to one embodiment, bidirectional intra-screen prediction may be applied to a current block. At this time, a first intra-screen prediction mode for bidirectional intra-screen prediction may be selected from at least one left-directional intra-screen prediction mode and at least one upward-directional intra-screen prediction mode of a predetermined intra-screen prediction mode group. In addition, a second intra-screen prediction mode having a prediction direction opposite to that of the first intra-screen prediction mode may be determined as the intra-screen prediction mode for bidirectional intra-screen prediction. In other words, two intra-screen prediction modes having opposite prediction directions may be applied to bidirectional intra-screen prediction.
[0224] According to one embodiment, when bidirectional intra-screen prediction is applied, the prediction value of the current sample may be determined based on a weighted sum of a reference sample of the current sample according to a prediction mode within the first screen and a reference sample of the current sample according to a prediction mode within the second screen. In this case, the weight applied to the weighted sum of the reference samples may be determined based on at least one of the position and prediction direction of the current sample.
[0225] In step 1404, a first reference sample of the current block in the restoration area is determined.
[0226] In step 1406, a second reference sample of the current block of the unrestored area is derived. The second reference sample may be composed of samples in one or more right columns adjacent to the current block and samples in one or more lower rows.
[0227] According to one embodiment, the second reference sample may be derived based on a neural network model that inputs samples of the restoration region. The input samples of the restoration region may include at least one of a left restoration sample, an upper restoration sample, an upper-left restoration sample, an upper-right restoration sample, and a lower-left restoration sample of the current block. In addition, the input samples of the restoration region may be composed of samples of one or more left columns adjacent to the current block and samples of one or more upper rows.
[0228] In one embodiment, the second reference sample may be derived based on surrounding samples of a matching block searched by template matching based on a current template of the current block.
[0229] According to one embodiment, two or more matching blocks can be searched for by template matching based on the template of the current block. In addition, the second reference sample can be determined based on a weighted sum of two or more surrounding samples at corresponding positions of the two or more matching blocks. In this case, the weight used in the weighted sum of the two or more surrounding samples can be determined based on the similarity between the reference templates of the two or more matching blocks and the current template.
[0230] According to one embodiment, the second reference sample may be derived based on surrounding samples of a matching block in a restoration area indicated by a block vector of the current block.
[0231] In step 1408, intra-screen prediction according to an intra-screen prediction mode is performed based on at least one of the determined first reference sample and the derived second reference sample.
[0232] Depending on the prediction method performed in steps 1402 to 1408, the current block can be encoded or decoded. And the bitstream generated by the encoder according to the prediction method performed in steps 1402 to 1408 can be stored in a recording medium or transmitted outside the encoder.
[0233]
[0234] And when the on-screen prediction method of FIG. 14 is applied to image decoding, the image decoding method may further include a step of generating a residual block of the current block by inversely transforming the transform coefficient data of the current block. At this time, in the inverse transform, a first inverse transform method applying a separable main inverse transform and a secondary inverse transform or a second inverse transform method applying a non-separable main inverse transform may be selected for the current block.
[0235] According to one embodiment, when the first inverse transform method is applied, a multiple transform set may be selected from among a plurality of multiple transform sets according to at least one of a transform size for the separable main inverse transform and an in-screen prediction mode, and a transform kernel applied to the separable main inverse transform may be selected from among a plurality of transform kernels of the multiple transform sets.
[0236] And when the first transformation method is applied, a non-separable transformation set may be selected from among a plurality of non-separable transformation sets according to an in-screen prediction mode for secondary inverse transformation, and a transformation kernel applied to secondary inverse transformation may be selected from among a plurality of transformation kernels of the non-separable transformation set.
[0237] According to one embodiment, the plurality of multi-transform sets may include a multi-transform set corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode, and the plurality of non-separable transform sets may include a non-separable transform set corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode.
[0238] According to one embodiment, when the prediction directions of the prediction mode within the first screen and the prediction mode within the second screen are opposite to each other, the multi-transform set and the non-separable transformation set selected when the prediction mode within the first screen is applied and the multi-transform set and the non-separable transformation set selected when the prediction mode within the second screen is applied may be set to be the same.
[0239] According to one embodiment, when the second inverse transform method is applied, for the non-separable main inverse transform, a non-separable main transform set may be selected from among a plurality of non-separable main transform sets according to at least one of the transform size and the prediction mode within the screen, and a transform kernel applied to the non-separable main inverse transform may be selected from among a plurality of transform kernels of the non-separable main transform set.
[0240] According to one embodiment, the plurality of non-separable primary transform sets may include non-separable primary transform sets corresponding to right-directional intra-screen prediction modes and bottom-directional intra-screen prediction modes.
[0241] According to one embodiment, when the prediction directions of the first intra-screen prediction mode and the second intra-screen prediction mode are symmetrical to each other, the non-separable main transformation set selected when the first intra-screen prediction mode is applied to the current block may be set to be identical to the non-separable main transformation set selected when the second intra-screen prediction mode is applied to the current block.
[0242]
[0243] And when the on-screen prediction method of FIG. 14 is applied to image encoding, the image encoding method may further include a step of generating transform coefficient data of the current block by transforming the residual block of the current block. At this time, in the transform, a first transform method in which a separable main transform and a secondary transform are applied, or a second transform method in which a non-separable main transform is applied, may be selected for the current block.
[0244] According to one embodiment, when the first transformation method is applied, a multiple transformation set may be selected from among a plurality of multiple transformation sets according to at least one of a transformation size and an in-screen prediction mode for a separate main transformation, and a transformation kernel applied to the separate main transformation may be selected from among a plurality of transformation kernels of the multiple transformation sets.
[0245] And when the first transformation method is applied, a non-separable transformation set may be selected from among a plurality of non-separable transformation sets according to an in-screen prediction mode for the secondary transformation, and a transformation kernel applied to the secondary transformation may be selected from among a plurality of transformation kernels of the non-separable transformation set.
[0246] According to one embodiment, the plurality of multi-transform sets may include a multi-transform set corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode, and the plurality of non-separable transform sets may include a non-separable transform set corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode.
[0247] According to one embodiment, when the prediction directions of the prediction mode within the first screen and the prediction mode within the second screen are opposite to each other, the multi-transform set and the non-separable transformation set selected when the prediction mode within the first screen is applied and the multi-transform set and the non-separable transformation set selected when the prediction mode within the second screen is applied may be set to be the same.
[0248] According to one embodiment, when the second transformation method is applied, a non-separable main transformation set may be selected from among a plurality of non-separable main transformation sets according to at least one of a transformation size and an intra-screen prediction mode for a non-separable main transformation, and a transformation kernel applied to the non-separable main transformation may be selected from among a plurality of transformation kernels of the non-separable main transformation set.
[0249] According to one embodiment, the plurality of non-separable primary transform sets may include non-separable primary transform sets corresponding to right-directional intra-screen prediction modes and bottom-directional intra-screen prediction modes.
[0250] According to one embodiment, when the prediction directions of the first intra-screen prediction mode and the second intra-screen prediction mode are symmetrical to each other, the non-separable main transformation set selected when the first intra-screen prediction mode is applied to the current block may be set to be identical to the non-separable main transformation set selected when the second intra-screen prediction mode is applied to the current block.
[0251]
[0252] FIG. 15 is a drawing exemplifying a content streaming system to which an embodiment according to the present invention can be applied.
[0253] As illustrated in FIG. 15, a content streaming system to which an embodiment of the present invention 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.
[0254] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and CCTVs into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and CCTVs directly generate bitstreams, the encoding server may be omitted.
[0255] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present invention is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0256] 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.
[0257] 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.
[0258] 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.
[0259] 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.
[0260]
[0261] The above embodiments can be performed in the same or corresponding manner in an encoding device and a decoding device. In addition, an image can be encoded / decoded using at least one or a combination of at least one of the above embodiments.
[0262] The order in which the above embodiments are applied may be different in the encoding device and the decoding device. Alternatively, the order in which the above embodiments are applied may be the same in the encoding device and the decoding device.
[0263] The above embodiments can be performed for each of the luminance and chrominance signals. Alternatively, the above embodiments can be performed identically for the luminance and chrominance signals.
[0264] In the above embodiments, the methods are described based on a flowchart as a series of steps or units. However, the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.
[0265] The above embodiments may be implemented in the form of program commands that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination. The program commands recorded on the computer-readable recording medium may be those specifically designed and constructed for the present invention, or may be known and usable by those skilled in the art of computer software.
[0266] The bitstream generated by the encoding method according to the above embodiment can be stored in a non-transitory computer-readable recording medium. In addition, the bitstream stored in the non-transitory computer-readable recording medium can be decoded by the decoding method according to the above embodiment.
[0267] Here, examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.
[0268] Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above examples, and those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.
[0269] Therefore, the idea of the present invention should not be limited to the embodiments described above, and all things that are modified equally or equivalently to the following claims as well as the claims are considered to fall within the scope of the idea of the present invention.
[0270] The present invention can be used in a device for encoding / decoding an image and a recording medium storing a bitstream.
Claims
1. In the video decryption method, A step for determining the on-screen prediction mode of the current block; A step of determining a first reference sample of the current block in the restoration area; A step of deriving a second reference sample of the current block in the unrestored area; and A method for decoding an image, comprising the step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
2. In paragraph 1, The above second reference sample is, An image decoding method characterized by being derived based on a neural network model that takes samples of the above restoration area as input.
3. In paragraph 2, The sample of the above input restoration area is, An image decoding method, characterized in that it includes at least one of a left restoration sample, an upper restoration sample, an upper left restoration sample, an upper right restoration sample, and a lower left restoration sample of the current block.
4. In paragraph 2, The sample of the restoration area entered above is An image decoding method, characterized in that the image decoding method comprises one or more samples of the left column adjacent to the current block and one or more samples of the upper row.
5. In paragraph 1, The above second reference sample is, An image decoding method characterized in that the image is derived based on surrounding samples of a matching block searched by template matching based on the current template of the current block.
6. In paragraph 5, Two or more matching blocks are searched by template matching based on the template of the current block above, The second reference sample is determined based on a weighted sum of two or more surrounding samples of corresponding positions of the two or more matching blocks, The weights used in the weighted sum of the above two or more surrounding samples are: An image decoding method characterized in that the similarity between the reference template of the two or more matching blocks and the current template is determined.
7. In paragraph 1, The above second reference sample is, An image decoding method characterized in that the block vector of the current block is derived based on surrounding samples of a matching block in a restoration area indicated by the block vector.
8. In paragraph 1, The above second reference sample is, An image decoding method characterized in that the current block is composed of samples of one or more right columns adjacent to the current block and samples of one or more lower rows.
9. In paragraph 1, The step of determining the on-screen prediction mode of the current block is: Determines the on-screen prediction mode from a given on-screen prediction mode group, A video decoding method, characterized in that the above predetermined intra-screen prediction mode group includes at least one right-directional intra-screen prediction mode and at least one lower-directional intra-screen prediction mode.
10. In paragraph 9, The above-mentioned group of prediction modes within the screen is: comprising at least one left-facing in-screen prediction mode and at least one top-facing in-screen prediction mode, All of the above at least one left-directional screen prediction mode corresponds one-to-one with the above at least one right-directional screen prediction mode, A video decoding method, characterized in that at least one of the above upper directional intra-screen prediction modes corresponds one-to-one with at least one of the above lower directional intra-screen prediction modes.
11. In paragraph 9, The step of determining the on-screen prediction mode of the current block is: When bidirectional intra-screen prediction is applied to the current block, a first intra-screen prediction mode is selected from at least one left-directional intra-screen prediction mode and at least one upper-directional intra-screen prediction mode of the predetermined intra-screen prediction mode group, A video decoding method, characterized in that the first intra-screen prediction mode and the second intra-screen prediction mode having a prediction direction opposite to that of the first intra-screen prediction mode are determined as the intra-screen prediction modes of the current block.
12. In paragraph 11, Based on the weighted sum of the reference sample of the current sample according to the prediction mode in the first screen and the reference sample of the current sample according to the prediction mode in the second screen, the prediction value of the current sample is determined, An image decoding method, characterized in that a weight applied to a weighted sum of the above reference samples is determined by at least one of the position and prediction direction of the current sample.
13. In paragraph 9, The above video decryption method is, A step of generating a residual block of the current block by inversely transforming the transform coefficient data of the current block, An image decoding method characterized in that, in the above inverse transform, a first inverse transform method in which a separable primary inverse transform and a second inverse transform are applied or a second inverse transform method in which a non-separable primary inverse transform is applied is applied.
14. In paragraph 13, In the step of generating a residual block of the current block, When the above first inverse transformation method is applied, For the separable primary inverse transform, a multiple transformation set is selected from among a plurality of multiple transformation sets based on at least one of the transformation size and the prediction mode within the screen, and a transformation kernel applied to the separable primary inverse transform is selected from among a plurality of transformation kernels of the multiple transformation sets. For the secondary inverse transform, a non-separable transform set is selected from among a plurality of non-separable transform sets according to the prediction mode within the screen, and a transform kernel applied to the secondary inverse transform is selected from among a plurality of transform kernels of the non-separable transform sets. A video decoding method, characterized in that the plurality of multi-transform sets include multi-transform sets corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode, and the plurality of non-separable transform sets include non-separable transform sets corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode.
15. In paragraph 14, An image decoding method, characterized in that when the prediction directions of the prediction mode within the first screen and the prediction mode within the second screen are opposite, a multi-transform set and a non-separable transformation set selected when the prediction mode within the first screen is applied to the current block are identical to a multi-transform set and a non-separable transformation set selected when the prediction mode within the second screen is applied to the current block.
16. In paragraph 13, In the step of generating a residual block of the current block, When the second inverse transform method is applied, for the non-separable main inverse transform, a non-separable main transform set is selected from among a plurality of non-separable main transform sets according to at least one of the transform size and the prediction mode within the screen, and a transform kernel applied to the non-separable main inverse transform is selected from among a plurality of transform kernels of the non-separable main transform sets. A method for decoding an image, characterized in that the plurality of non-separable main transform sets include non-separable main transform sets corresponding to a right-directional intra-screen prediction mode and a bottom-directional intra-screen prediction mode.
17. In paragraph 16, An image decoding method, characterized in that when the prediction directions of the first intra-screen prediction mode and the second intra-screen prediction mode are symmetrical to each other, a non-separable main transform set selected when the first intra-screen prediction mode is applied to the current block is identical to a non-separable main transform set selected when the second intra-screen prediction mode is applied to the current block.
18. In a video encoding method, A step for determining the on-screen prediction mode of the current block; A step of determining a first reference sample of the current block in the restoration area; A step of deriving a second reference sample of the current block in the unrestored area; and A video encoding method comprising the step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
19. In a computer-readable recording medium storing a bitstream generated by a video encoding method, In a video encoding method, A step for determining the on-screen prediction mode of the current block; A step of determining a first reference sample of the current block in the restoration area; A step of deriving a second reference sample of the current block in the unrestored area; and A recording medium characterized by comprising a step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
20. A bitstream transmission method for transmitting a bitstream generated by a video encoding method, A step of encoding an image based on the above image encoding method; and Comprising a step of transmitting a bitstream including the encoded image, The above image encoding method is, A step for determining the on-screen prediction mode of the current block; A step of determining a first reference sample of the current block in the restoration area; A step of deriving a second reference sample of the current block in the unrestored area; and A bitstream transmission method, characterized by comprising a step of performing intra-screen prediction according to the intra-screen prediction mode based on at least one of the determined first reference sample and the derived second reference sample.
Citation Information
Patent Citations
Plasma processing apparatus and method
KR1020230172939A
Information providing system for remote control of unmanned tower crane
KR102430256B1
Method and apparatus for video coding
US20200221109A1
On Padding Methods For Neural Network-Based In-Loop Filter
US20220394309A1
KR20210058846A
