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

By employing an automatic rearrangement block vector and gradient histograms to determine chrominance intra prediction modes, the method addresses inefficiencies in high-resolution image data transmission and storage, enhancing encoding/decoding efficiency and reducing costs.

WO2025178381A1PCT designated stage Publication Date: 2025-08-28HYUNDAI MOTOR CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/002430
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-20
Filing Date
2025-02-20
Publication Date
2025-08-28

AI Technical Summary

Technical Problem

High-resolution and high-quality image data transmission and storage face increased costs due to inefficiencies in chrominance intra prediction, particularly in direct mode and direct block vector mode, where available information is limited.

Method used

A method for determining a color difference intra prediction mode using an automatic rearrangement block vector derived from luminance block vectors, incorporating intra template matching and intra block copy modes, and utilizing gradient histograms and occurrence rates to enhance chrominance intra prediction efficiency.

Benefits of technology

Improves encoding/decoding efficiency and chrominance intra prediction accuracy by leveraging luminance block information for chrominance blocks, reducing data transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025002430_28082025_PF_FP_ABST
    Figure KR2025002430_28082025_PF_FP_ABST
Patent Text Reader

Abstract

An image encoding / decoding method and device, a recording medium on which a bitstream is stored, and a transmission method are provided. The image decoding method comprises the steps of: deriving a corresponding luminance block of the current chrominance block; deriving information for intra prediction of the current chrominance block on the basis of the corresponding luminance block; and generating a prediction block of the current chrominance block on the basis of the information for intra prediction of the current chrominance block, wherein: if a first block vector, which is a block vector of the corresponding luminance block, is defined and a second block vector, which is a block vector of a first matching luminance block indicated by the first block vector, is defined, the information for intra prediction of the current chrominance block is derived on the basis of an automatic rearrangement block vector derived on the basis of the first block vector and the second block vector; and the automatic rearrangement block vector can indicate a second luminance matching block.
Need to check novelty before this filing date? Find Prior Art

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, a device, and a recording medium storing a bitstream for chrominance intra prediction.

[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] Specifically, in the image encoding / decoding method, intra prediction of a chrominance block can be performed. The intra prediction mode of the chrominance block can include a direct mode that uses intra prediction mode information of a luminance block corresponding to the chrominance block, and a direct block vector mode that uses a corresponding chrominance block using a block vector of the luminance block.

[0004] However, limitations in the chrominance intra prediction efficiency may occur when the information available in direct mode and direct block vector mode is not obtained.

[0005] The purpose of the present invention is to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.

[0006] In addition, the present invention aims to provide a recording medium storing a bitstream generated by an image decoding method or device according to the present invention.

[0007] In addition, the present invention aims to provide a method for determining a color difference intra prediction mode to solve the problems of the existing direct mode and direct block vector mode as described above.

[0008] An image decoding method according to one embodiment of the present invention includes the steps of deriving a corresponding luminance block of a current chrominance block, deriving information for intra prediction of the current chrominance block based on the corresponding luminance block, and generating a prediction block of the current chrominance block based on the information for intra prediction of the current chrominance block, wherein when a first block vector which is a block vector of the corresponding luminance block is defined and a second block vector which is a block vector of a first matching luminance block indicated by the first block vector is defined, the information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, and the automatic rearrangement block vector can indicate a second luminance matching block.

[0009] In the above image decoding method, it may be characterized in that the intra prediction mode of the current chrominance block is a direct mode, and the intra prediction mode of the second matching luminance block is one of an intra template matching mode and an intra block copy mode.

[0010] In the above image decoding method, the information for intra prediction of the current chrominance block is a chrominance intra prediction mode, and the chrominance intra prediction mode of the current chrominance block may be determined based on DIMD (Decoder side intra mode derivation).

[0011] In the above image decoding method, the DIMD may be performed based on a gradient histogram of pixels in the second matching luminance block.

[0012] In the above image decoding method, the DIMD may be performed based on a gradient histogram of surrounding pixels of the second matching luminance block.

[0013] In the above image decoding method, the DIMD may be performed based on the difference between the restored pixel in the second matching luminance block and the predicted pixel of the second matching luminance block.

[0014] In the above image decoding method, the chrominance intra prediction mode of the current chrominance block may be derived based on a third matching luminance block indicated by a block vector of the second matching luminance block.

[0015] In the above image decoding method, the DIMD may be performed based on a gradient histogram of pixels in the third matching luminance block.

[0016] In the above image decoding method, the DIMD may be performed based on a gradient histogram of surrounding pixels of the third matching luminance block.

[0017] In the above image decoding method, the DIMD may be performed based on the difference between the restored pixel in the third matching luminance block and the predicted pixel of the third matching luminance block.

[0018] In the above image decoding method, it may be characterized in that the chrominance intra prediction mode of the current chrominance block is determined as a predefined intra prediction mode.

[0019] In the above image decoding method, the chrominance intra prediction mode of the current chrominance block may be derived based on a merged gradient histogram derived by merging gradient histograms of pixels of surrounding blocks adjacent to the corresponding luminance block.

[0020] In the above image decoding method, it may be characterized in that the chrominance intra prediction mode of the current chrominance block is derived based on an occurrence histogram according to the occurrence rate of the intra prediction mode of the surrounding blocks of the corresponding luminance block.

[0021] In the above image decoding method, the intra prediction mode of the current chrominance block may be a direct block vector mode, and information for intra prediction of the current chrominance block may be a prediction block of a matching chrominance block indicated by a block vector derived by scaling the automatic rearrangement block vector.

[0022] An image encoding method according to one embodiment of the present invention comprises the steps of: deriving a corresponding luminance block of a current chrominance block; deriving information for intra prediction of the current chrominance block based on the corresponding luminance block; and generating a prediction block of the current chrominance block based on the information for intra prediction of the current chrominance block, wherein when a first block vector which is a block vector of the corresponding luminance block is defined and a second block vector which is a block vector of a first matching luminance block indicated by the first block vector is defined, the information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, and the automatic rearrangement block vector indicates a second luminance matching block.

[0023] A non-transitory computer-readable recording medium according to one embodiment of the present invention can store a bitstream generated by a video encoding method, including the steps of deriving a corresponding luminance block of a current chrominance block, deriving information for intra prediction of the current chrominance block based on the corresponding luminance block, and generating a prediction block of the current chrominance block based on the information for intra prediction of the current chrominance block, wherein when a first block vector which is a block vector of the corresponding luminance block is defined and a second block vector which is a block vector of a first matching luminance block indicated by the first block vector is defined, the information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, and the automatic rearrangement block vector indicates a second luminance matching block.

[0024] A bitstream transmission method according to one embodiment of the present invention comprises the steps of transmitting the bitstream, deriving a corresponding luminance block of a current chrominance block, deriving information for intra prediction of the current chrominance block based on the corresponding luminance block, and generating a prediction block of the current chrominance block based on the information for intra prediction of the current chrominance block, wherein a first block vector which is a block vector of the corresponding luminance block is defined, and a second block vector which is a block vector of a first matching luminance block indicated by the first block vector is defined, the information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, and the automatic rearrangement block vector indicates a second luminance matching block. A bitstream generated by an image encoding method can be transmitted.

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

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

[0027] Additionally, according to the present invention, a chrominance intra prediction method in direct mode and direct block vector mode can be provided.

[0028] Additionally, according to the present invention, a color difference intra prediction method using automatic rearrangement block vector prediction can be provided.

[0029] In addition, according to the present invention, the color difference intra prediction efficiency can be improved.

[0030] The effects that can be obtained from the present invention are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by a person having ordinary skill in the art to which the present invention belongs from the description below.

[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] FIG. 4 is a diagram for explaining an intra-template matching mode prediction method according to an embodiment of the present invention.

[0035] FIG. 5 is a diagram for explaining an intra block copy mode prediction method according to an embodiment of the present invention.

[0036] FIG. 6 is a diagram illustrating an automatic rearrangement block vector of a current block according to one embodiment of the present invention.

[0037] FIG. 7 is a diagram illustrating a color difference intra prediction method of direct mode according to one embodiment of the present invention.

[0038] FIG. 8 is a diagram illustrating a chrominance intra prediction method of direct block vector mode according to one embodiment of the present invention.

[0039] Figure 9 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

[0040] FIG. 10 is a drawing exemplifying a content streaming system to which an embodiment according to the present invention can be applied.

[0041] 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. 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, 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 exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.

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

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

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

[0045] In embodiments, 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 embodiments, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.

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

[0047] Glossary of Terms

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

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

[0050] Hereinafter, the terms encoder and image encoding device may be used interchangeably and have the same meaning.

[0051] Hereinafter, the terms decoder and image decoding device may be used interchangeably and have the same meaning.

[0052] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.

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

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

[0055] Hereinafter, the terms “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.

[0056] Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.

[0057] Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.

[0058]

[0059] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

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

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

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

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

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

[0065] 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 an intra-screen prediction mode, and the inter mode can mean an 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 a 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.

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

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

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

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

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

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

[0072] Among these, AFFINE mode is a technology that is used in both AMVP and MERGE modes and also has high encoding efficiency. In the existing video coding standard, since MC (Motion Compensation) is performed by considering only the parallel translation of the block, there was a disadvantage in that it could not properly compensate for motions that occur in reality, such as zoom in / out and rotation. To supplement this, a 4-parameter affine motion model using two control point motion vectors (CPMV) and a 6-parameter affine motion model using three control point motion vectors can be applied to inter prediction. Here, CPMV is a vector representing the affine motion model of one of the upper left, upper right, and lower left of the current block.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0092] Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.

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

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

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

[0096] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0097] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.

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

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

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

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

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

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

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

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

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

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

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

[0109] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

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

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

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

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

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

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

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

[0117]

[0118] In this specification, Direct Mode (DM) and Direct Block Vector (DBV) modes for deriving chrominance intra prediction modes are described.

[0119] Direct mode is a mode in which the intra prediction mode of a chrominance block is determined based on the intra prediction mode information of a luminance block corresponding to the chrominance block.

[0120] Direct block vector mode is a mode in which the block vector information of a chrominance block is derived from the block vector information of a luminance block corresponding to the chrominance block.

[0121] In order to improve the accuracy of the direct mode, the encoder / decoder of the present invention can determine the chrominance intra prediction mode based on the intra prediction mode of the matching luminance block of the corresponding luminance block. Specifically, when the intra prediction mode of the corresponding luminance block in the direct mode is either the intra template matching mode or the intra block copy mode, the chrominance intra prediction mode can be determined based on the intra prediction mode of the matching luminance block of the corresponding luminance block.

[0122] Here, the chrominance intra prediction mode refers to the intra prediction mode of the chrominance block, and the corresponding luminance block and the matching luminance block may refer to a luminance block corresponding to the current chrominance block and a luminance block indicated by a block vector of the corresponding luminance block, respectively.

[0123] Before explaining the method for deriving the color difference intra prediction mode, an intra template matching prediction (IntraTMP) method and an intra block copy prediction method according to an embodiment of the present invention will be explained with reference to FIGS. 4 and 5.

[0124]

[0125] FIG. 4 is a diagram for explaining an intra-template matching mode prediction method according to an embodiment of the present invention.

[0126] The intra template matching mode prediction method means a method of searching for an optimal prediction block in a restored area of ​​the current picture using template matching when the intra prediction mode of the current block is the intra template matching mode, and copying it to generate a prediction block of the current block.

[0127] Referring to FIG. 4, the neighboring ┌ area (i.e., the left, top, and upper left areas) of the current block (Current block, 410) can be defined as the current template (Current template, 420). Then, the reference template (Reference template, 440) most similar to the current template (420) can be searched within the predefined search range (R1, R2, R3, R4) of the reconstructed area (Reconstructed area, 430) of the current picture (Current picture, 400). Then, the prediction block of the current block (410) can be derived based on the corresponding matching block (Matching block, 450) of the determined reference template (440). Then, the block vector (Block vector, 460) is a vector indicating the matching block (450) of the current block in intra template matching prediction.

[0128] The predefined search ranges R1, R2, R3, and R4 in Fig. 4 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.

[0129] Additionally, the predefined search range may be searched for reference templates based on a predefined search order. For example, the reference templates may be searched in a zigzag order of R1, R4, R3, R2.

[0130] Meanwhile, information regarding the search range and the size and shape of the current template can be determined by the encoder and transmitted to the decoder. Furthermore, the search range and the size and shape of the current template can be set to preset values ​​in the encoder / decoder.

[0131] For example, instead of a ┌-shaped template that uses both the left restoration area and the top restoration area, you can use only the top restoration area or the left restoration area as a template.

[0132] For example, the size of the current template can be determined as (w x L2) + (L1 xh) + (L1 x L2) as shown in Fig. 4. Here, w and h represent the width and height of the current block, and the values ​​of L1 and L2 can be determined as any positive integer.

[0133] With respect to the template shape, the example of FIG. 4 uses a ┌-shaped template to search for a reference template most similar to the current template, but this can also be done using, for example, a ┌-shaped template, a template using only the top region, a template using only the left region, or a template of any shape to search for a reference template most similar to the current template.

[0134] Meanwhile, the current block (410) in FIG. 4 may be a luma block. At this time, the current picture (400) to which the luma block belongs may be a luma picture. In addition, the matching block (450) indicated by the block vector (460) may be a matching luma block of the luma block.

[0135]

[0136] FIG. 5 is a diagram for explaining an intra block copy mode prediction method according to an embodiment of the present invention.

[0137] The intra block copy prediction method means a method of searching for an optimal prediction block in a restored area of ​​the current picture using a block vector when the intra prediction mode of the current block is the intra block copy mode, and copying it to generate a prediction block of the current block.

[0138] Referring to FIG. 5, a matching block (Matching Block, 540) can be derived within a predefined search range (R1, R2, R3, R4) of a reconstructed area (530) of a current picture (500) based on a block vector (Block vector, 520) of a current block (510). In addition, a prediction block of the current block (510) can be derived based on the matching block (540). Meanwhile, the block vector (520) is a vector indicating a matching block (540) of the current block (510) in intra block copy prediction.

[0139] The predefined search ranges R1, R2, R3, and R4 in Fig. 5 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.

[0140] Additionally, matching blocks may be searched based on a predefined search order within a predefined search range. For example, matching blocks may be searched in a zigzag order of R1, R4, R3, R2.

[0141] Meanwhile, information about the search range can be determined by the encoder and transmitted to the decoder. Furthermore, the search range can be set to a preset value in the encoder / decoder.

[0142] Meanwhile, the current block (510) in FIG. 5 may be a luma block. At this time, the current picture (500) to which the luma block belongs may be a luma picture. In addition, the matching block (540) indicated by the block vector (520) may be a matching luma block of the luma block.

[0143]

[0144] Here, the block vector may be the block vector of the current block, or a block vector derived from the sum of the block vector of the current block and the block vector of the matching block. The block vector derived from the sum of the block vector of the current block and the block vector of the matching block may be referred to as an automatic rearrangement block vector. The automatic rearrangement block vector may be derived as described below.

[0145]

[0146] FIG. 6 is a diagram illustrating an automatic rearrangement block vector of a current block according to one embodiment of the present invention.

[0147] Referring to Figure 6, the block vector BV of the current block 0,1 can be defined. The block vector BV of the current block 0,1 can point to B1, which is the matching block of the current block. And, the block vector BV of the matching block B1 of the current block 1,2 can be defined. The block vector BV of the matching block B1 1,2 can point to block B2. The block vector BV of the current block 0,1 Block vector BV of matching block B1 1,2 When is defined, the automatic relocation block vector can be derived according to the mathematical formula below.

[0148]

[0149] In the process of deriving an automatic rearrangement block vector, when N+1 matching blocks and a block vector are defined, the automatic rearrangement block vector can be derived according to the mathematical formula below.

[0150]

[0151] Hereinafter, with reference to FIGS. 7 to 9, a color difference intra prediction method using an automatic rearrangement block vector according to an embodiment of the present invention will be described in detail.

[0152]

[0153] FIG. 7 is a diagram illustrating a color difference intra prediction method of direct mode according to one embodiment of the present invention.

[0154] Referring to FIG. 7, a current chroma block (700) may be defined in a chroma picture (701). A corresponding luma block (710) represents a luma block corresponding to the current chroma block (700). And a luma picture (711) represents a picture including the corresponding luma block (710).

[0155] Here, the tree type of the current block may be a dual tree type. In this case, the partition structure of the current chrominance block (700) may be different from the partition structure of the corresponding luminance block (710). The intra prediction mode of the current chrominance block (700) of the dual tree chroma type may be determined using intra prediction mode information of any position among specific positions (C, TL, TR, BL, BR) of the corresponding luminance block (710).

[0156] On the other hand, if the tree type of the current block is a single tree type, unlike as illustrated in FIG. 7, the division structure of the current chrominance block (700) may be identical to the division structure of the corresponding luminance block (710). In this case, the intra prediction mode of the current chrominance block (700) may be determined as the intra prediction mode of the pixel located at position C of the corresponding luminance block (710).

[0157] The direct mode of chrominance intra prediction may be a mode that derives intra prediction mode information of a current chrominance block (700) using intra prediction mode information of a corresponding luminance block (710). However, if the intra prediction mode of a sample located at a specific position (C, TL, TR, BL, BR) of the corresponding luminance block (710) is an intra template matching prediction (IntraTMP) mode or an intra block copy (IBC) mode, a first matching luminance block (712) may be determined. The first matching luminance block (712) may be determined by a block vector BV0 (713) of the corresponding luminance block (710) or a reference sample (714) of the corresponding luminance block. In addition, the intra prediction mode of the current chrominance block (700) may be derived as an intra prediction mode of a sample at a specific position within the first matching luminance block (712). Here, the given position can be one of the center, top left, top right, bottom left, and bottom right.

[0158] Here, if the intra prediction mode of a sample located at a specific location (C, TL, TR, BL, BR) of the first matching luminance block (712) is an intra template matching prediction mode or an intra block copy mode, a second matching luminance block (715) can be determined. The second matching luminance block (715) can be determined based on the block vector BV1 (716) of the first matching luminance block (712) or the reference sample (717) of the first matching luminance block.

[0159] Block vector BV0 (713) of the corresponding luminance block (710) And the block vector BV1 (715) of the first matching luminance block (712) is added to obtain the automatic rearrangement block vector BV 0+1 (718) can be derived. And, the intra prediction mode information of the current chrominance block (700) is the automatic rearrangement block vector BV 0+1 (718) can be derived into an intra prediction mode of a given sample of the second matching luminance block (715). To derive the intra prediction mode of a given sample of the second matching luminance block (715), a sample of the second matching luminance block (715), a reference sample (719) of the second matching luminance block, or a neighboring sample of the second matching luminance block (715) can be used.

[0160] Here, N block vectors can be used to derive intra prediction mode information of the current chrominance block (700). N can be a positive integer greater than or equal to 1. According to the embodiment illustrated in Fig. 7, the intra prediction mode information of the current chrominance block (700) is derived by adding two block vectors, which are automatically rearranged block vectors BV. 0+1 (718) can be derived using

[0161] To derive intra prediction mode information of the current chrominance block (700), a limited number of block vectors can be used. And, a luminance block can be determined using the limited number of block vectors. If the intra prediction mode of the luminance block is a predetermined intra prediction mode using a block vector, the intra prediction mode of the current chrominance block (700) may not be derived from the luminance block. Therefore, the intra prediction mode of the current chrominance block (700) can be derived by deriving a prediction mode that can replace the intra prediction mode of the luminance block according to the method below.

[0162]

[0163] According to one embodiment of the present disclosure, the intra prediction mode of the current chrominance block can be determined based on intra prediction mode information derived by applying a decoder-based intra prediction mode derivation method to pixels in a corresponding luminance block.

[0164] Specifically, a decoder-based intra prediction mode derivation method can be performed based on a gradient histogram of pixels within a corresponding luminance block. An edge detection filter, such as a Sobel filter, a Roberts cross filter, a Prewitt filter, a Scharr filter, or a Laplacian filter, can be applied to pixels within the corresponding luminance block. As a result of applying the edge detection filter to pixels within the corresponding luminance block, a gradient of the corresponding pixel can be calculated. Then, a histogram of gradients (HoG) can be generated based on the calculated gradients.

[0165] According to one embodiment, the intra prediction mode information may be determined as an intra prediction mode that is mapped to a gradient having a largest value among a histogram of gradients.

[0166] According to another embodiment, the intra prediction mode information may be determined as one intra prediction mode among intra prediction modes mapped to any M gradients selected from a histogram of gradients. Here, the determined one intra prediction mode may be an intra prediction mode having a smallest index value or an intra prediction mode having a largest index value among the intra prediction modes mapped to the M gradients.

[0167] Here, if the intensity of the gradient in the histogram of the gradient is below a certain value, the intra prediction mode information can be determined as a predetermined non-directional mode. The predetermined non-directional mode can be a planar mode or a DC mode.

[0168] As a result, the intra mode of the current chrominance block can be determined by the intra prediction mode information of the corresponding luminance block.

[0169] According to another embodiment, intra prediction modes that are mapped to any M gradients selected from a histogram of gradients can be determined. Then, prediction blocks generated using the intra prediction modes can be weighted and combined to generate a prediction block for the current chrominance block. Here, M is a positive integer greater than or equal to 2.

[0170] Meanwhile, a decoder-based intra prediction mode derivation method can also be performed using a gradient histogram of pixels within a downsampled corresponding luminance block. That is, downsampling is performed on the reconstructed pixels within the corresponding luminance block, an edge detection filter is applied to the downsampled pixels to calculate the gradient, and a gradient histogram can be generated based on this. In this case, the downsampling ratio can be determined arbitrarily.

[0171]

[0172] According to one embodiment of the present disclosure, the intra prediction mode of the current chrominance block can be determined based on intra prediction mode information derived by applying a decoder-based intra prediction mode derivation method to surrounding reference pixels of the corresponding luminance block.

[0173] Specifically, a decoder-based intra prediction mode derivation method can be performed based on a gradient histogram of surrounding reference pixels of a corresponding luminance block. An edge detection filter, such as a Sobel filter, a Roberts cross filter, a Prewitt filter, a Schar filter, or a Laplacian filter, can be applied to the surrounding reference pixels of the corresponding luminance block. As a result of applying the edge detection filter to the surrounding reference pixels of the corresponding luminance block, a gradient of a restored pixel can be calculated. Then, a histogram of gradients can be generated based on the calculated gradients.

[0174] According to one embodiment, the intra prediction mode information may be determined as an intra prediction mode that is mapped to a gradient having a largest value among a histogram of gradients.

[0175] According to another embodiment, the intra prediction mode information may be determined as one intra prediction mode among intra prediction modes mapped to any L gradients selected from a histogram of gradients. Here, the determined one intra prediction mode may be an intra prediction mode having a smallest index value or an intra prediction mode having a largest index value among the intra prediction modes mapped to the L gradients.

[0176] Here, if the intensity of the gradient in the histogram of the gradient is below a certain value, the intra prediction mode information can be determined as a predetermined non-directional mode. The predetermined non-directional mode can be a planar mode or a DC mode.

[0177] As a result, the determined intra prediction mode can be determined as the intra mode of the current chrominance block, which is the direct mode.

[0178] According to another embodiment, initial prediction blocks of the current chrominance block can be generated using each of the intra prediction modes mapped to any L gradients selected from the gradient histogram. Then, a prediction block for the current chrominance block can be generated by weighting the initial prediction blocks. Here, L is a positive integer greater than or equal to 2.

[0179] Meanwhile, the surrounding reference pixels of the corresponding luminance block are pixels in the ┌ area adjacent to the left, top, and upper left, but this is an example, and the surrounding reference pixels of the corresponding luminance block can be determined as any pixel around the corresponding luminance block. For example, the surrounding reference pixels of the corresponding luminance block can be surrounding pixels of the corresponding luminance block sampled at any rate.

[0180] In addition, a decoder-based intra prediction mode derivation method can be performed based on the difference between a reconstructed pixel in a corresponding luminance block and a predicted pixel of the corresponding luminance block. Specifically, predicted pixels to which a non-directional intra prediction mode and a directional intra prediction mode (e.g., 65 directions) are applied to pixels in the corresponding luminance block are respectively obtained, and the difference between each predicted pixel and a reconstructed pixel in the corresponding luminance block is calculated. Then, the chrominance intra prediction mode can be determined as the intra prediction mode applied to the predicted pixel having the smallest difference from the reconstructed pixel in the corresponding luminance block. At this time, the difference can be calculated by any one of the Sum of Absolute Difference (SAD) method, the Sum of Squared Difference (SSD) method, and the Sum of Absolute Transformed Difference (SATD) method.

[0181]

[0182] According to one embodiment of the present disclosure, a matching luminance block can be determined by a block vector of a corresponding luminance block. Here, the matching luminance block can be a luminance block indicated by a block vector (BV0) of the corresponding luminance block. Alternatively, the matching luminance block can be an automatic rearrangement block vector (BV) of the corresponding luminance block. N ) may be a luminance block indicated by.

[0183] And, the intra prediction mode of the current chrominance block can be determined by intra prediction mode information derived by applying a decoder-based intra prediction mode derivation method to pixels in a matching luminance block. Specifically, the decoder-based intra prediction mode derivation method can be performed based on a gradient histogram of pixels in the matching luminance block. An edge detection filter, such as a Sobel filter, a Roberts cross filter, a Prewitt filter, a Schar filter, a Laplacian filter, etc., can be applied to pixels in the matching luminance block. As a result of applying the edge detection filter to pixels in the matching luminance block, a gradient of the corresponding pixel can be calculated. And, a histogram of gradients can be generated based on the calculated gradients.

[0184] According to one embodiment, the intra prediction mode information may be determined as an intra prediction mode that is mapped to a gradient having a largest value among a histogram of gradients.

[0185] According to another embodiment, the intra prediction mode information may be determined as one intra prediction mode among intra prediction modes mapped to any K gradients selected from a histogram of gradients. Here, the determined one intra prediction mode may be an intra prediction mode having a smallest index value or an intra prediction mode having a largest index value among the intra prediction modes mapped to the K gradients.

[0186] Here, if the intensity of the gradient in the histogram of the gradient is below a certain value, the intra prediction mode information can be determined as a predetermined non-directional mode. The predetermined non-directional mode can be a planar mode or a DC mode.

[0187] As a result, the determined intra prediction mode can be determined as the intra mode of the current chrominance block, which is the direct mode.

[0188] According to another embodiment, initial prediction blocks of the current chrominance block can be generated using each of the intra prediction modes mapped to any K gradients selected from the gradient histogram. Then, a prediction block for the current chrominance block can be generated by weighting the initial prediction blocks. Here, K is a positive integer greater than or equal to 2.

[0189] Meanwhile, a decoder-based intra prediction mode derivation method can also be performed using a gradient histogram of pixels within a downsampled matching luminance block. That is, downsampling is performed on the reconstructed pixels within the matching luminance block, an edge detection filter is applied to the downsampled pixels to calculate the gradient, and a gradient histogram can be generated based on this. In this case, the downsampling ratio can be arbitrarily determined.

[0190]

[0191] According to another embodiment of the present disclosure, the intra prediction mode of the current chrominance block can be determined by intra prediction mode information derived by applying a decoder-based intra prediction mode derivation method to surrounding reference pixels adjacent to the matching luminance block.

[0192] Here, the matching luminance block may be a luminance block indicated by the block vector (BV0) of the corresponding luminance block. Alternatively, the matching luminance block may be an automatic rearrangement block vector (BV N ) may be a luminance block indicated by.

[0193] Specifically, a decoder-based intra prediction mode derivation method can be performed based on a gradient histogram of surrounding reference pixels of a matching luminance block. An edge detection filter, such as a Sobel filter, a Roberts cross filter, a Prewitt filter, a Schar filter, or a Laplacian filter, can be applied to the surrounding pixels of the matching luminance block. As a result of applying the edge detection filter to the surrounding pixels of the matching luminance block, a gradient of a restored pixel can be calculated. Then, a histogram of the gradient can be generated based on the calculated gradient.

[0194] According to one embodiment, the intra prediction mode information may be determined as an intra prediction mode that is mapped to a gradient having a largest value among a histogram of gradients.

[0195] According to another embodiment, the intra prediction mode information may be determined as one intra prediction mode among intra prediction modes mapped to any S gradients selected from a histogram of gradients. Here, the determined one intra prediction mode may be an intra prediction mode having a smallest index value or an intra prediction mode having a largest index value among the intra prediction modes mapped to the S gradients.

[0196] Here, if the intensity of the gradient in the histogram of the gradient is below a certain value, the intra prediction mode information can be determined as a predetermined non-directional mode. The predetermined non-directional mode can be a planar mode or a DC mode.

[0197] As a result, the determined intra prediction mode can be determined as the intra mode of the current chrominance block, which is the direct mode.

[0198] According to another embodiment, initial prediction blocks of the current chrominance block can be generated using each of the intra prediction modes mapped to any S gradients selected from the histogram of gradients. Then, a prediction block for the current chrominance block can be generated by weighting the initial prediction blocks. Here, S is a positive integer greater than or equal to 2.

[0199] Meanwhile, the surrounding reference pixels of the matching luminance block are pixels in the ┌ region adjacent to the left, top, and upper left, but this is an example, and the surrounding reference pixels of the matching luminance block can be determined as any pixel around the matching luminance block. For example, the surrounding reference pixels of the matching luminance block can be surrounding pixels of the matching luminance block sampled at any rate.

[0200] In addition, a decoder-based intra prediction mode derivation method can be performed based on the difference between a reconstructed pixel in a matching luminance block and a predicted pixel of the matching luminance block. Specifically, predicted pixels to which a non-directional intra prediction mode and a directional intra prediction mode (e.g., 65 directions) are applied to pixels in the matching luminance block are respectively obtained, and the difference between each predicted pixel and a reconstructed pixel in the matching luminance block is calculated. Then, the chrominance intra prediction mode can be determined as the intra prediction mode applied to the predicted pixel having the smallest difference from the reconstructed pixel in the matching luminance block. At this time, the difference can be calculated by any one of the Sum of Absolute Difference (SAD) method, the Sum of Squared Difference (SSD) method, and the Sum of Absolute Transformed Difference (SATD) method.

[0201]

[0202] According to one embodiment of the present disclosure, the intra prediction mode of the current chrominance block may be determined by predefined intra prediction mode information. For example, the predefined intra prediction mode may be one of the existing intra prediction modes, such as a planar mode, a DC mode, a vertical mode, or a horizontal mode.

[0203]

[0204] According to one embodiment of the present disclosure, the intra prediction mode of the current chrominance block can be determined by intra prediction mode information derived by applying a histogram-based intra mode derivation method of a merge gradient.

[0205] Specifically, a method for deriving intra-modes based on a histogram of merged gradients can be performed based on a histogram of gradients of pixels within neighboring blocks of a corresponding luminance block. As a result of applying an edge detection filter to pixels within the neighboring blocks, the gradients of the corresponding pixels of each neighboring block can be calculated. Based on the calculated gradients, a histogram of gradients of each neighboring block can be generated. Then, a histogram of merged gradients (MHoG) of the corresponding luminance block can be generated by merging the histograms of gradients of each neighboring block.

[0206] When the intra prediction mode of a neighboring block is DIMD, a histogram of gradients of the neighboring block can be derived. The histogram of gradients of the neighboring block can be used to derive a histogram of merged gradients of the corresponding luminance block. Here, the amplitude values ​​of the histogram of gradients of the neighboring block can be normalized. Alternatively, the amplitude values ​​of the histogram of gradients of the neighboring block may not be normalized.

[0207] Alternatively, if the intra prediction mode of the neighboring block is MIMD, a histogram of the merge gradients of the neighboring block can be derived. The histogram of the merge gradients of the neighboring block can be used to derive a histogram of the merge gradients of the corresponding luminance block. Here, the amplitude values ​​of the histogram of the merge gradients of the neighboring block can be normalized. Alternatively, the amplitude values ​​of the histogram of the merge gradients of the neighboring block may not be normalized.

[0208] If the intra prediction mode of a neighboring block is a mode other than DIMD or MIMD, a histogram of gradients of the neighboring block can be derived based on the intra prediction mode of the neighboring block. Furthermore, the histogram of gradients of the neighboring block can be used to derive a histogram of merged gradients of the corresponding luminance block. Here, the amplitude of the histogram of gradients of the neighboring block can be determined depending on the size of the neighboring block.

[0209] When the intra prediction mode of a neighboring block is SGPM or TIMD mode, the histogram of the gradient of the neighboring block can be derived based on the two intra prediction modes derived for the neighboring block. Then, the histogram of the gradient of the neighboring block can be used to derive the histogram of the merged gradient of the corresponding luminance block. Here, the amplitude of the histogram of the neighboring reference block can be determined depending on the size of the neighboring reference block.

[0210] According to one embodiment, the intra prediction mode information may be determined as an intra prediction mode that is mapped to a gradient having a largest value among a histogram of merged gradients.

[0211] According to another embodiment, the intra prediction mode information may be determined as one intra prediction mode among intra prediction modes mapped to any M gradients selected from a histogram of merged gradients. Here, the determined one intra prediction mode may be an intra prediction mode having a smallest index value or an intra prediction mode having a largest index value among the intra prediction modes mapped to the M gradients.

[0212] Here, if the intensity of the gradient in the histogram of the merged gradient is below a certain value, the intra prediction mode information can be determined as a predetermined non-directional mode. The predetermined non-directional mode can be a planar mode or a DC mode.

[0213] As a result, the determined intra prediction mode can be determined as the intra mode of the current chrominance block, which is the direct mode.

[0214] According to another embodiment, initial prediction blocks of the current chrominance block can be generated using each of the intra prediction modes mapped to any M gradients selected from the histogram of merged gradients. Then, a prediction block for the current chrominance block can be generated by weighting the initial prediction blocks. Here, M is a positive integer greater than or equal to 2.

[0215] Meanwhile, the histogram-based intra-mode derivation method of the merged gradient can also be performed using the gradient histogram of pixels within the downsampled corresponding luminance block and / or neighboring blocks. That is, downsampling is performed on the reconstructed pixels within the corresponding luminance block and / or neighboring blocks, an edge detection filter is applied to the downsampled pixels to calculate the gradient, and a merged gradient histogram can be generated based on this. At this time, the downsampling ratio can be arbitrarily determined.

[0216]

[0217] Alternatively, the histogram-based intra mode derivation method of the merged gradient can be performed based on the gradient histogram of pixels in neighboring blocks of the matching luminance block. The matching luminance block can be a luminance block indicated by the block vector (BV0) of the corresponding luminance block. Or, the matching luminance block can be an automatic rearrangement block vector (BV) of the corresponding luminance block. N ) may be a luminance block indicated by.

[0218] By applying an edge detection filter to pixels within neighboring blocks, the gradient of each corresponding pixel in each neighboring block can be calculated. Based on the calculated gradient, a histogram of the gradients of each neighboring block can be generated. Then, by merging the histograms of the gradients of each neighboring block, a histogram of the merged gradient of the matching luminance block can be generated.

[0219] The method of generating a gradient histogram or a merged gradient histogram based on the intra prediction mode of the neighboring block may be as described above.

[0220] Additionally, the method for determining the intra prediction mode of the current chrominance block based on the histogram of the merged gradient of the matching luminance block may be as described above.

[0221]

[0222] According to one embodiment of the present disclosure, the intra prediction mode of the current chrominance block can be determined by intra prediction mode information derived by applying an occurrence-based intra mode derivation (OBIC) method to the corresponding luminance block.

[0223] Specifically, the occurrence rate-based intra mode derivation method can be performed based on the intra prediction modes of neighboring blocks of a corresponding luminance block. Here, the neighboring blocks may include neighboring blocks adjacent to the corresponding luminance block or non-adjacent neighboring blocks. An occurrence histogram (Histogram of Occurrence, HOC) can be generated based on sample-wise occurrence of the intra mode for each pixel of the neighboring blocks. Here, the occurrence value of the occurrence histogram can be calculated in proportion to the number of pixels of the neighboring blocks. If the intra prediction mode of a pixel in the neighboring block is a mode that uses multiple intra prediction modes, such as SGPM, TIMD, and DIMD modes, the occurrence histogram can be generated by considering the multiple intra prediction modes.

[0224] The intra prediction mode of the current chrominance block can be determined as the mode with the largest value among the occurrence histograms.

[0225] Alternatively, the intra prediction mode of the current chrominance block may be determined as one intra prediction mode among W modes selected from the occurrence histograms. Here, the determined one intra prediction mode may be an intra prediction mode having a smallest index value or an intra prediction mode having a largest index value among the W intra prediction modes.

[0226] As a result, the determined intra prediction mode can be determined as the intra mode of the current chrominance block, which is the direct mode.

[0227] According to another embodiment, a prediction block of the current chrominance block can be generated using each of the intra prediction modes mapped to any W gradients selected from the occurrence histogram. Then, a prediction block for the current chrominance block can be generated by weighting and combining the prediction blocks using different intra prediction modes. Here, W is a positive integer greater than or equal to 2.

[0228]

[0229] Alternatively, the intra prediction mode of the current chrominance block can be determined by intra prediction mode information derived by applying an incidence-based intra mode derivation method to the matching luminance block. The matching luminance block can be a luminance block indicated by a block vector (BV0) of the corresponding luminance block. Alternatively, the matching luminance block can be an automatic rearrangement block vector (BV) of the corresponding luminance block. N ) may be a luminance block indicated by.

[0230] The incidence-based intra mode derivation method can be performed based on the intra prediction modes of neighboring blocks of a matching luminance block. Here, the neighboring blocks may include neighboring blocks adjacent to the matching luminance block or non-adjacent neighboring blocks. An incidence histogram can be generated based on the intra prediction mode information generated for each pixel of the neighboring blocks.

[0231] The method for generating an occurrence histogram based on the intra prediction mode of the neighboring block may be as described above.

[0232] Additionally, the method for determining the intra prediction mode of the current chrominance block based on the occurrence histogram of the matching luminance block may be as described above.

[0233]

[0234] FIG. 8 is a diagram illustrating a chrominance intra prediction method of direct block vector mode according to one embodiment of the present invention.

[0235] Referring to FIG. 8, a current chrominance block (800) may be defined in a chrominance picture (801). Then, a corresponding luminance block, which is a block corresponding to the current chrominance block (800), may be defined within a luminance picture corresponding to the chrominance picture (801). The position of the corresponding luminance block within the luminance picture may correspond to the position of the current chrominance block (800) within the chrominance picture (801).

[0236] The direct block mode of chrominance intra prediction may be a mode that derives a prediction block of the current chrominance block (800) based on the block vector of the current chrominance block (800). The block vector of the current chrominance block (800) may be derived based on the block vector of the corresponding luminance block. Specifically, a pixel (C, T) at a predetermined position within the corresponding luminance block L , T R, B L, B R ) is an intra template matching mode or an intra block copy mode, a block vector BV0 of a corresponding luminance block can be defined. The block vector BV0 can indicate a first matching luminance block. If the intra prediction mode of a sample at a predetermined position in the first matching luminance block is a mode other than the intra template matching prediction mode and the intra block copy mode, a block vector for chrominance intra prediction of the current chrominance block (800) can be derived by scaling the block vector BV0.

[0237] On the other hand, if the intra prediction mode of a sample at a predetermined position within the first matching luminance block is an intra template matching prediction mode or an intra block copy mode, a block vector BV1 of a sample at a predetermined position within the first matching luminance block can be defined. In this case, a second matching luminance block, which is a luminance block indicated by the block vector BV1, can be determined. The block vector BV0 of the corresponding luminance block and the block vector BV1 of the first matching luminance block are added to obtain an automatic rearrangement block vector BV 0+1(816) can be derived. And, the block vector (Scaled block vector (BV) for chrominance intra prediction of the current chrominance block (800) 0+1 ) for current chroma block, 802) is the automatic rearrangement block vector BV 0+1 (816) can be derived by scaling.

[0238] The prediction block of the current chrominance block (800) can be derived as a block indicated by a block vector for chrominance intra prediction.

[0239] T pieces of block vector information can be used to derive a block vector for chrominance intra prediction of the current chrominance block (800). Here, T is a positive integer greater than or equal to 1. As illustrated in Fig. 8, a block vector for chrominance intra prediction can be derived using two pieces of block vector information (BV0 and BV1).

[0240] If a limited number of block vectors are used to derive block vector information of the current chrominance block (800), and the block vector of the matching luminance block indicated by the derived block vector cannot be used, a block vector for chrominance intra prediction can be derived based on the block vectors within the limited number.

[0241]

[0242] Figure 9 is a flowchart illustrating an image decoding method according to an embodiment of the present invention. The image decoding method of Figure 9 can be performed by an image decoding device.

[0243] Referring to FIG. 9, the image decoding device can derive a corresponding luminance block of the current chrominance block (S900).

[0244] The image decoding device can derive information for intra prediction of the current chrominance block based on the corresponding luminance block (S901).

[0245] The image decoding device can generate a prediction block of the current chrominance block based on information for intra prediction of the current chrominance block (S902).

[0246] Here, when a first block vector, which is a block vector of a corresponding luminance block, is defined, and a second block vector, which is a block vector of a first matching luminance block indicated by the first block vector, is defined, information for intra prediction of the current chrominance block can be derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector. In addition, the automatic rearrangement block vector can indicate a second luminance matching block.

[0247] Here, the intra prediction mode of the current chrominance block is a direct mode, and the intra prediction mode of the second matching luminance block can be any one of an intra template matching mode and an intra block copy mode.

[0248] Here, information for intra prediction of the current chrominance block is a chrominance intra prediction mode, and the chrominance intra prediction mode of the current chrominance block can be determined based on DIMD (Decoder side intra mode derivation).

[0249] Here, DIMD can be performed based on a gradient histogram of pixels within the second matching luminance block. Alternatively, DIMD can be performed based on a gradient histogram of surrounding pixels within the second matching luminance block. Alternatively, DIMD can be performed based on a difference between a reconstructed pixel within the second matching luminance block and a predicted pixel of the second matching luminance block.

[0250] Here, the chrominance intra prediction mode of the current chrominance block can be derived based on the third matching luminance block indicated by the block vector of the second matching luminance block. In this case, DIMD can be performed based on the gradient histogram of pixels in the third matching luminance block. Alternatively, DIMD can be performed based on the gradient histogram of surrounding pixels in the third matching luminance block. Alternatively, DIMD can be performed based on the difference between the reconstructed pixels in the third matching luminance block and the predicted pixels in the third matching luminance block.

[0251] Here, the chrominance intra prediction mode of the current chrominance block can be determined as a predefined intra prediction mode.

[0252] Here, the chrominance intra prediction mode of the current chrominance block can be derived based on a merged gradient histogram derived by merging gradient histograms of pixels of surrounding blocks adjacent to the corresponding luminance block.

[0253] Here, the chrominance intra prediction mode of the current chrominance block can be derived based on an occurrence histogram according to the occurrence rate of the intra prediction mode of the surrounding blocks of the corresponding luminance block.

[0254] Alternatively, the intra prediction mode of the current chrominance block may be a direct block vector mode, and the information for intra prediction of the current chrominance block may be a prediction block of a matching chrominance block indicated by a block vector derived by scaling an automatic rearrangement block vector.

[0255] Meanwhile, the steps described in FIG. 9 can be performed in the same manner in an image encoding method. Furthermore, a bitstream can be generated by an image encoding method including the steps described in FIG. 9. The bitstream can be stored on a non-transitory computer-readable recording medium and can also be transmitted (or streamed).

[0256]

[0257] FIG. 10 is a drawing exemplifying a content streaming system to which an embodiment according to the present invention can be applied.

[0258] As illustrated in FIG. 10, 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.

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

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

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

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

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

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

[0265]

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

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

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

[0269] 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 that other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.

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

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

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

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

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

[0275] 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 of deriving a corresponding luminance block of the current chrominance block; A step of deriving information for intra prediction of the current chrominance block based on the corresponding luminance block; and A step of generating a prediction block of the current chrominance block based on information for intra prediction of the current chrominance block, When a first block vector, which is a block vector of the corresponding luminance block, is defined, and a second block vector, which is a block vector of the first matching luminance block indicated by the first block vector, is defined, Information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, An image decoding method, characterized in that the above automatic rearrangement block vector indicates a second luminance matching block.

2. In paragraph 1, The intra prediction mode of the current chrominance block above is direct mode, An image decoding method, characterized in that the intra prediction mode of the second matching luminance block is one of an intra template matching mode and an intra block copy mode.

3. In paragraph 2, The information for intra prediction of the current chrominance block above is a chrominance intra prediction mode, An image decoding method, characterized in that the chrominance intra prediction mode of the current chrominance block is determined based on DIMD (Decoder side intra mode derivation).

4. In paragraph 3, An image decoding method, characterized in that the above DIMD is performed based on a gradient histogram of pixels within the second matching luminance block.

5. In paragraph 3, An image decoding method, characterized in that the above DIMD is performed based on a gradient histogram of surrounding pixels of the second matching luminance block.

6. In paragraph 3, An image decoding method, characterized in that the DIMD is performed based on the difference between the restored pixels in the second matching luminance block and the predicted pixels of the second matching luminance block.

7. In paragraph 3, An image decoding method, characterized in that the chrominance intra prediction mode of the current chrominance block is derived based on a third matching luminance block indicated by a block vector of the second matching luminance block.

8. In paragraph 7, An image decoding method, characterized in that the above DIMD is performed based on a gradient histogram of pixels within the third matching luminance block.

9. In paragraph 7, An image decoding method, characterized in that the above DIMD is performed based on a gradient histogram of surrounding pixels of the third matching luminance block.

10. In paragraph 7, An image decoding method, characterized in that the DIMD is performed based on the difference between the restored pixel in the third matching luminance block and the predicted pixel of the third matching luminance block.

11. In paragraph 2, An image decoding method, characterized in that the chrominance intra prediction mode of the current chrominance block is determined as a predefined intra prediction mode.

12. In paragraph 2, An image decoding method, characterized in that the chrominance intra prediction mode of the current chrominance block is derived based on a merged gradient histogram derived by merging gradient histograms of pixels of surrounding blocks adjacent to the corresponding luminance block.

13. In paragraph 2, An image decoding method, characterized in that the chrominance intra prediction mode of the current chrominance block is derived based on an occurrence histogram according to the occurrence rate of the intra prediction mode of the surrounding blocks of the corresponding luminance block.

14. In paragraph 1, The intra prediction mode of the current chrominance block above is direct block vector mode, Information for intra prediction of the current color difference block above is: An image decoding method characterized in that the prediction block of the matching chrominance block is indicated by a block vector derived by scaling the above automatic rearrangement block vector.

15. In the video encoding method, A step of deriving a corresponding luminance block of the current chrominance block; A step of deriving information for intra prediction of the current chrominance block based on the corresponding luminance block; and A step of generating a prediction block of the current chrominance block based on information for intra prediction of the current chrominance block, When a first block vector, which is a block vector of the corresponding luminance block, is defined, and a second block vector, which is a block vector of the first matching luminance block indicated by the first block vector, is defined, Information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, A video encoding method, characterized in that the above automatic rearrangement block vector indicates a second luminance matching block.

16. In a non-transitory computer-readable recording medium storing a bitstream generated by an image encoding method, The above image encoding method is, A step of deriving a corresponding luminance block of the current chrominance block; A step of deriving information for intra prediction of the current chrominance block based on the corresponding luminance block; and A step of generating a prediction block of the current chrominance block based on information for intra prediction of the current chrominance block, When a first block vector, which is a block vector of the corresponding luminance block, is defined, and a second block vector, which is a block vector of the first matching luminance block indicated by the first block vector, is defined, Information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, A non-transitory computer-readable recording medium, characterized in that the above automatic rearrangement block vector points to a second luminance matching block.

17. A method for transmitting a bitstream generated by a video encoding method, The above transmission method includes a step of transmitting the bitstream, The above image encoding method is, A step of deriving a corresponding luminance block of the current chrominance block; A step of deriving information for intra prediction of the current chrominance block based on the corresponding luminance block; and A step of generating a prediction block of the current chrominance block based on information for intra prediction of the current chrominance block, When a first block vector, which is a block vector of the corresponding luminance block, is defined, and a second block vector, which is a block vector of the first matching luminance block indicated by the first block vector, is defined, Information for intra prediction of the current chrominance block is derived based on an automatic rearrangement block vector derived based on the first block vector and the second block vector, A transmission method, characterized in that the above automatic rearrangement block vector indicates a second luminance matching block.

Citation Information

Patent Citations

  • Image encoding apparatus and image encoding method

    KR101644898B1

  • Graphite sheet and manufacturing method thereof

    KR102575637B1

  • Method for encoding / decoidng video signal and apparatus therefor

    KR102617439B1