Image encoding / decoding method and apparatus, and recording medium storing bit stream

By determining and reordering the intra prediction mode candidate groups from the reference block of the chroma block, the problem of low encoding efficiency of high resolution images is solved, the encoding/decoding efficiency of the image is improved, and the transmission and storage costs are reduced.

CN119174172APending Publication Date: 2024-12-20HYUNDAI MOTOR CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202380039179.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-03
Filing Date
2023-05-09
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the encoding/decoding efficiency of high-resolution and high-quality images, resulting in increased transmission and storage costs.

Method used

By determining the chromaticity intra prediction mode candidate group from the reference block of the current chromaticity block, reordering according to the priority of the intra prediction mode candidates, chromaticity intra prediction mode information indicating the intra prediction mode of the chromaticity block is obtained by re-ordering the chromaticity intra prediction mode according to the priority of the intra prediction mode candidates, chromaticity intra prediction mode information indicating the intra prediction mode of the chromaticity block is obtained , and determine the intra prediction mode of the current chromaticity block based on this.

Benefits of technology

Improves the predictive coding efficiency of chroma blocks, reduces the bit traffic required for image encoding/decoding, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119174172A_ABST
    Figure CN119174172A_ABST
Patent Text Reader

Abstract

The present invention provides an image decoding method comprising the steps of: determining a chroma intra prediction mode candidate group of a current chroma block from a reference block of the current chroma block; reordering the intra prediction mode candidates of the chroma intra prediction mode candidate group of the current chroma block according to the priorities of the intra prediction mode candidates; acquiring chroma intra prediction mode information indicating an intra prediction mode of the current chroma block from the chroma intra prediction mode candidate group; and determining an intra prediction mode of the current chroma block based on the chroma intra prediction mode information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image encoding / decoding method and apparatus and a recording medium for storing a bit stream. More particularly, the present invention relates to an image encoding / decoding method and apparatus using a chroma intra prediction method and a recording medium for storing a bit stream. Background Art

[0002] Recently, in various application fields, the demand for high-resolution, high-quality images (such as ultra-high-definition (UHD) images) has been increasing. As the resolution and quality of image data become higher, the amount of data increases relatively compared to existing image data. Therefore, when image data is transmitted using a medium such as existing wired and wireless broadband lines or stored using existing storage media, the transmission and storage costs increase. In order to solve these problems that arise as the resolution and quality of image data become higher, efficient image encoding / decoding technology with images of higher resolution and quality is required.

[0003] In intra prediction of an image, it is necessary to use different intra prediction mode determination methods according to the color components of the block. In the case of a luminance block, the intra prediction mode is determined independently of the chrominance block, and all intra prediction modes supported by the image codec can be applied as intra prediction mode candidates. However, since the chrominance block has a high similarity with the corresponding luminance block, a method of improving encoding efficiency by limiting the applicable intra prediction mode candidates with reference to the corresponding luminance block is being discussed. Summary of the invention

[0004] Technical issues

[0005] An object of the present invention is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0006] Another object of the present invention is to provide a recording medium for storing a bit stream generated by the image decoding method or device provided by the present invention.

[0007] Technical Solution

[0008] An image decoding method according to an embodiment of the present invention may include: determining a chroma intra-frame prediction mode candidate group of a current chroma block from a reference block of the current chroma block, reordering the intra-frame prediction mode candidates of the chroma intra-frame prediction mode candidate group of the current chroma block according to the priority of the intra-frame prediction mode candidates, obtaining chroma intra-frame prediction mode information indicating the intra-frame prediction mode of the current chroma block from the chroma intra-frame prediction mode candidate group, and determining the intra-frame prediction mode of the current chroma block based on the chroma intra-frame prediction mode information.

[0009] According to an embodiment, the reference block of the current chroma block may include a plurality of luminance blocks divided from a current luminance block corresponding to the current chroma block.

[0010] According to an embodiment, multiple luminance blocks may correspond to multiple reference positions of the current chrominance block, and the multiple reference positions may include at least two positions of a center position, an upper left position, an upper right position, a lower left position, and a lower right position.

[0011] According to an embodiment, the reference block of the current chroma block may include chroma blocks adjacent to the current chroma block.

[0012] According to an embodiment, the chroma blocks adjacent to the current chroma block may include at least one of a left chroma block, an upper chroma block, a lower left chroma block, an upper right chroma block, and an upper left chroma block of the current chroma block.

[0013] According to an embodiment, the reference block of the current chrominance block may include a luminance block adjacent to the current luminance block corresponding to the current chrominance block.

[0014] According to an embodiment, the luminance blocks adjacent to the current luminance block may include at least one luminance block of a left luminance block, an upper luminance block, a lower left luminance block, an upper right luminance block, and a lower left luminance block of the current luminance block.

[0015] According to an embodiment, determining a chroma intra-prediction mode candidate group for a current chroma block from a reference block of the current chroma block may include: including the intra-prediction mode of the reference block of the current chroma block in the chroma intra-prediction mode candidate group, and when the number of intra-prediction mode candidates included in the chroma intra-prediction mode candidate group is less than a predetermined value, including a secondary intra-prediction mode derived from the intra-prediction mode candidates included in the chroma intra-prediction mode candidate group in the chroma intra-prediction mode candidate group.

[0016] According to an embodiment, the secondary intra prediction mode may be an intra prediction mode having an index value greater or smaller by a predetermined value than an index value of an intra prediction mode candidate of the chroma intra prediction mode candidate group.

[0017] According to an embodiment, determining a chroma intra-prediction mode candidate group for a current chroma block from a reference block of the current chroma block may include: including an intra-prediction mode derived from the reference block of the current chroma block in the chroma intra-prediction mode candidate group, and when the number of intra-prediction mode candidates included in the chroma intra-prediction mode candidate group is less than a predetermined value, including a default mode in the chroma intra-prediction mode candidate group.

[0018] According to an embodiment, determining a chroma intra-prediction mode candidate group for a current chroma block from a reference block of the current chroma block may include: extracting an intra-prediction mode from the reference block of the current chroma block, and when the extracted intra-prediction mode does not overlap with an intra-prediction mode candidate included in the chroma intra-prediction mode candidate group, including the extracted intra-prediction mode in the chroma intra-prediction mode candidate group.

[0019] According to an embodiment, the priorities of intra prediction mode candidates may be determined based on a template of the current chroma block.

[0020] According to an embodiment, the template may be a reconstructed area having a predetermined size, and the template is adjacent to at least one of the left and upper directions of the current chroma block, and the priority of the intra-frame prediction mode candidate may be determined based on the difference between the reconstructed samples of the template and the predicted samples of the template predicted according to the intra-frame prediction mode candidate.

[0021] According to an embodiment, the priorities of intra prediction mode candidates may be determined based on a plurality of related blocks of the current chroma block.

[0022] According to an embodiment, the priorities of the intra prediction mode candidates may be determined by calculating the number of relevant blocks to which the intra prediction mode candidates are applied or calculating the total area of ​​the relevant blocks.

[0023] According to an embodiment, the related blocks of the current chroma block may include at least one of a luminance block included in a current luminance block corresponding to the current chroma block, a chroma block adjacent to the current chroma block, a luminance block adjacent to the current luminance block, and a chroma block decoded before decoding the current chroma block.

[0024] According to an embodiment, the chroma intra-frame prediction mode information may include: main flag information indicating whether the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group is the intra-frame prediction mode of the current chroma block; and remaining index information, when the main flag information indicates that the intra-frame prediction mode of the current chroma block is not the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group, the remaining index information indicates the intra-frame prediction mode of the current chroma block among the remaining intra-frame prediction mode candidates other than the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group.

[0025] An image encoding method according to an embodiment of the present invention may include: determining a chroma intra-frame prediction mode candidate group of a current chroma block from a reference block of the current chroma block; reordering the intra-frame prediction mode candidates of the chroma intra-frame prediction mode candidate group of the current chroma block according to the priority of the intra-frame prediction mode candidates; determining the intra-frame prediction mode of the current chroma block; and encoding chroma intra-frame prediction mode information indicating the intra-frame prediction mode of the current chroma block from the chroma intra-frame prediction mode candidate group.

[0026] The non-transitory computer-readable recording medium according to an embodiment of the present invention may store a bit stream generated by an image encoding method.

[0027] The transmission method according to the embodiment of the present invention transmits a bit stream generated by the image encoding method.

[0028] The features briefly summarized above with respect to the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.

[0029] Beneficial Effects

[0030] The present invention proposes a method for improving a method for determining an intra prediction mode applied to a chroma block.

[0031] In the present invention, by including an intra prediction mode that is highly applicable to a current chroma block in a chroma intra prediction mode candidate group, prediction encoding efficiency of a chroma block can be improved.

[0032] In addition, in the present invention, by reordering the intra prediction mode candidates of the chroma intra prediction mode candidate group according to their applicability to the current chroma block, the prediction encoding efficiency of the chroma block can be improved.

[0033] In addition, in the present invention, the prediction encoding efficiency of the chroma block can be improved according to various binarization methods of chroma intra prediction mode information indicating the intra prediction mode of the chroma block. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.

[0036] Figure 3 is a diagram schematically showing a video decoding system to which the present invention is applicable.

[0037] Figure 4 Luma blocks and chroma blocks for explaining chroma intra prediction modes included in the first to third sets are shown.

[0038] Figure 5 A flowchart of a method for determining a candidate group of chroma intra prediction modes according to the first to fifth sets is shown.

[0039] Figure 6 The template of the current chroma block used in the template-based intra mode derivation method and the reference pixels of the template used to generate the prediction template are shown.

[0040] Figure 7 A block for determining the occurrence frequency of an intra prediction mode for reordering intra prediction mode candidates of a chroma intra prediction mode candidate group is shown.

[0041] Figure 8 An embodiment of the image decoding method according to the present invention is shown.

[0042] Fig. 9 An embodiment of the image encoding method according to the present invention is shown.

[0043] Fig.10 A content streaming system applicable according to an embodiment of the present invention is exemplarily shown. DETAILED DESCRIPTION

[0044] Best Mode for Carrying Out the Invention

[0045] An image decoding method according to an embodiment of the present invention may include: determining a chroma intra-frame prediction mode candidate group of a current chroma block from a reference block of the current chroma block, reordering the intra-frame prediction mode candidates of the chroma intra-frame prediction mode candidate group of the current chroma block according to the priority of the intra-frame prediction mode candidates, obtaining chroma intra-frame prediction mode information indicating the intra-frame prediction mode of the current chroma block from the chroma intra-frame prediction mode candidate group, and determining the intra-frame prediction mode of the current chroma block based on the chroma intra-frame prediction mode information.

[0046] Embodiments of the present invention

[0047] The present invention may have various modifications and embodiments, and specific embodiments are shown 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 should be understood to include all modifications, equivalents or substitutes included in the spirit and scope of the present invention. In various aspects, similar reference numerals in the drawings indicate the same or similar functions. The shapes and sizes of the elements in the drawings can be provided by way of example for a clearer description. The detailed description of the exemplary embodiments described below refers to the drawings, which show specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice these embodiments. It should be understood that various embodiments are different from each other, but not necessarily mutually exclusive. For example, the specific shapes, structures and characteristics described herein can be implemented in other embodiments without departing from the spirit and scope of the present invention with respect to an embodiment. It should also be understood that the position or arrangement of each component in each disclosed embodiment can be changed without departing from the spirit and scope of the embodiment. Therefore, the specific embodiments described below are not intended to be restrictive, and the scope of the exemplary embodiments is limited only by the full range of equivalents to which the attached claims and these claims are entitled (if properly described).

[0048] In the present invention, the terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another component. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. The terms and / or include a combination of multiple related descriptive items or any item among multiple related descriptive items.

[0049] The components in the embodiments of the present invention are described independently to indicate different characteristic functions, and it is not intended that each component is formed as a separate hardware or software configuration unit. That is, for ease of explanation, each component is listed and included as a separate component, and at least two components may be combined to form a single component, or a component may be divided into multiple components to perform functions, and among them, the embodiment in which the components are integrated and the embodiment in which each component is divided are also included in the scope of the present invention, as long as they do not depart from the essence of the present invention.

[0050] The terms used in the present invention are only used to describe specific embodiments and are not intended to limit the present invention. Unless the context clearly indicates otherwise, singular expressions include plural expressions. In addition, some components of the present invention are not necessary components for performing the basic functions of the present invention, and may be optional components that are only used to improve performance. The present invention can be implemented by only including necessary components for realizing the essence of the present invention and not including components that are only used to improve performance, and the structure that only includes necessary components except optional components that are only used to improve performance is also included in the scope of the present invention.

[0051] In one embodiment, the term "at least one" may mean one of a number greater than and equal to 1, such as 1, 2, 3, and 4. In one embodiment, the term "plurality" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.

[0052] In the following, embodiments of the present invention are described in detail with reference to the accompanying drawings. In the embodiments described in this specification, if it is determined that a detailed description of a related known configuration or function may obscure the subject of this specification, the detailed description will be omitted, and the same reference numerals will be used for the same components in the accompanying drawings, and repeated descriptions of the same components will be omitted.

[0053] Description of terms

[0054] Hereinafter, "image" may mean a picture constituting a video, and may also mean the video itself. For example, "encoding and / or decoding of an image" may mean "encoding and / or decoding of a video", and may also mean "encoding and / or decoding of one of the images constituting the video".

[0055] Hereinafter, "motion picture" and "video" may be used with the same meaning and may be used interchangeably. In addition, the target image may be an encoding target image as an encoding target and / or a decoding target image as a decoding target. In addition, the target image may be an input image input to an encoding device, and may be an input image input to a decoding device. Here, the target image may have the same meaning as the current image.

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

[0057] Hereinafter, a "target block" may be an encoding target block as an encoding target and / or a decoding target block as a decoding target. In addition, a target block may be a current block as a target of current encoding and / or decoding. For example, "target block" and "current block" may be used with the same meaning and may be used interchangeably.

[0058] Hereinafter, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, "unit" may mean a block including a luma component block and a chroma component block corresponding thereto so as to distinguish it from a block. For example, a coding tree unit (CTU) may consist of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated therewith.

[0059] Hereinafter, "sample", "picture element" and "pixel" may be used with the same meaning and may be used interchangeably. Herein, a sample may mean a basic unit constituting a block.

[0060] Hereinafter, "inter" and "inter-screen" may be used with the same meaning and may be used interchangeably.

[0061] Hereinafter, "intra" and "in-screen" may be used with the same meaning and may be used interchangeably.

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

[0063] The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device 100 may encode one or more images sequentially.

[0064] refer to Figure 1 , the encoding device 100 may include an image segmentation unit 110, an intra-frame prediction unit 120, a motion prediction unit 121, a motion compensation unit 122, a switch 115, a subtractor 113, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, a dequantization unit 160, an inverse transform unit 170, an adder 117, a filter unit 180 and a reference picture buffer 190.

[0065] In addition, the encoding apparatus 100 may generate a bitstream including information encoded by encoding the input image and output the generated bitstream. The generated bitstream may be stored in a computer-readable recording medium or may be streamed through a wired / wireless transmission medium.

[0066] The image segmentation unit 110 can segment the input image 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 slices or slices, and then segmented into multiple coding tree units (CTUs) again. Alternatively, one picture can first be segmented into multiple sub-pictures defined as a group of rectangular slices, and each sub-picture can be segmented into slices / slices. Here, the sub-picture can be used to support the functions of partially independent encoding / decoding and transmitting pictures. Since multiple sub-pictures can be reconstructed separately, it has the advantage of being easy to edit in applications that configure multi-channel inputs into one picture. In addition, the slices can be divided horizontally to generate blocks. Here, blocks can be used as basic units for parallel processing within a picture. In addition, one CTU can be recursively segmented into a quadtree (QT), and the segmented terminal node can be defined as a coding unit (CU). CU can be segmented into PU (prediction unit) as a prediction unit and TU (transform unit) as a transform unit to perform prediction and segmentation. At the same time, the CU can be used as a prediction unit and / or a transform unit itself. Here, for flexible partitioning, each CTU can be recursively partitioned into a multi-type tree (MTT) and a quadtree (QT). The CTU can be partitioned into a multi-type tree starting from the terminal node of the QT, and the MTT can be composed of a binary tree (BT) and a ternary tree (TT). For example, the MTT structure can be classified into a vertical binary partition mode (SPLIT_BT_VER), a horizontal binary partition mode (SPLIT_BT_HOR), a vertical ternary partition mode (SPLIT_TT_VER), and a horizontal ternary partition mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quadtree of the luminance block during partitioning can be set to 16×16, the maximum block size (MaxBtSize) of the binary tree can be set to 128×128, and the maximum block size (MaxTtSize) of the ternary tree can be set to 64×64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the ternary tree can be specified as 4×4, and the maximum depth (MaxMttDepth) of the multi-type tree can be specified as 4. In addition, in order to increase the coding efficiency of the I slice, a dual tree of the CTU partition structure that uses the luminance component and the chrominance component differently can be applied. The above-mentioned four-tree structure may include a rectangular four-tree structure and a triangular four-tree structure to which geometric partitioning is applied. And the above-mentioned ternary tree structure may include a rectangular ternary tree structure and an asymmetric ternary tree structure to which geometric partitioning is applied. The above-mentioned binary tree structure may include a rectangular binary tree structure and a geometric binary tree structure to which geometric partitioning is applied.On the other hand, in P and B slices, luma and chroma coding tree blocks (CTBs) within a CTU may be partitioned into a single tree that shares a coding tree structure.

[0067] The encoding device 100 may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device 100 may perform encoding on the input image in a third mode other than intra mode and inter mode (e.g., IBC mode, palette mode, etc.). However, if the third mode has functional characteristics similar to those of the intra mode or the inter mode, the third mode may be classified as the intra mode or the inter mode for ease of explanation. In the present invention, the third mode is classified and described separately only when a specific description thereof is required.

[0068] When the intra mode is used as the prediction mode, the switch 115 may be switched to the intra mode, and when the inter mode is used as the prediction mode, the switch 115 may be switched to the inter mode. Here, the intra mode may refer to the intra prediction mode, and the inter mode may refer to the inter prediction mode. The encoding device 100 may generate a prediction block for an input block of an input image. In addition, the encoding device 100 may encode the residual block using the residual of the input block and the prediction block after generating the prediction block. The input image may be referred to as the current image (as the current encoding target). The input block may be referred to as the current block (as the current encoding target) or the encoding target block.

[0069] When the prediction mode is intra mode, the intra prediction unit 120 can use samples of blocks that have been encoded / decoded around the current block as reference samples. The intra prediction unit 120 can generate prediction samples of the input block by performing spatial prediction on the current block using the reference samples, or by spatial prediction. Here, intra prediction can mean intra-picture prediction.

[0070] As the intra prediction method, a non-directional prediction mode and a directional prediction mode (eg, 65 directions) such as a DC mode and a planar mode may be applied. Here, the intra prediction method may be expressed as an intra prediction mode or an intra-screen prediction mode.

[0071] When the prediction mode is the inter mode, the motion prediction unit 121 can retrieve the area that best matches the input block from the reference image in the motion prediction process, and derive the motion vector by using the retrieved area. In this case, the search area can be used as the area. The reference image can be stored in the reference picture buffer 190. Here, when encoding / decoding for the reference image is performed, it can be stored in the reference picture buffer 190.

[0072] The motion compensation unit 122 may generate a predicted block of the current block by performing motion compensation using a motion vector. Herein, inter prediction may mean inter prediction or motion compensation.

[0073] When the value of the motion vector is not an integer, the motion prediction unit 121 and the motion compensation unit 122 may generate a prediction block by applying an interpolation filter to a partial area of ​​the reference picture. In order to perform inter prediction or motion compensation, it may be determined whether the motion prediction and motion compensation mode of the prediction unit included in the coding unit is one of the skip mode, the merge mode, the advanced motion vector prediction (AMVP) mode, and the coding unit-based intra block copy (IBC) mode, and the inter prediction or motion compensation may be performed according to each mode.

[0074] In addition, based on the above-mentioned inter-frame prediction method, the AFFINE mode based on sub-PU prediction, the SbTMVP (sub-block-based temporal motion vector prediction) mode, the MMVD (merged with MVD) mode based on PU prediction, and the GPM (geometric partitioning mode) mode can be applied. In addition, in order to improve the performance of each mode, HMVP (history-based MVP), PAMVP (paired average MVP), CIIP (combined intra / inter prediction), AMVR (adaptive motion vector resolution), BDOF (bidirectional optical flow), BCW (bidirectional prediction with CU weights), LIC (local illumination compensation), TM (template matching), OBMC (overlapping block motion compensation), etc. can be applied.

[0075] The subtractor 113 may generate a residual block by using the difference between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may mean the difference between the original signal and the prediction signal. Alternatively, the residual signal may be a signal generated by transforming or quantizing, or transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.

[0076] The transform unit 130 may generate a transform coefficient by performing a transform on the residual block, and output the generated transform coefficient. Herein, 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 skip the transform of the residual block.

[0077] The quantization level may be generated by applying quantization to the transform coefficient or the residual signal. Hereinafter, the quantization level may also be referred to as the transform coefficient in the embodiments.

[0078] For example, a 4×4 luminance residual block generated by intra prediction is transformed using a basic vector based on discrete sine transform (DST), and the remaining residual block can be transformed using a basic vector based on discrete cosine transform (DCT). In addition, the transform block is partitioned into a quadtree shape for one block using a residual quadtree (RQT) technique, and after transforming and quantizing each transform block partitioned by RQT, a coded block flag (CBF) can be transmitted when all coefficients become 0 to increase coding efficiency.

[0079] As another alternative, a multiple transform selection (MTS) technique that selectively uses multiple transform bases to perform transforms can be applied. That is, instead of partitioning the CU into TUs through RQT, a function similar to TU partitioning can be performed through a sub-block transform (SBT) technique. Specifically, SBT is only applied to inter-prediction blocks, and unlike RQT, the current block can be partitioned into 1 / 2 or 1 / 4 sizes in the vertical or horizontal direction, and then the transform can be performed only on one of the blocks. For example, if it is partitioned vertically, the transform can be performed on the leftmost or rightmost block, and if it is partitioned horizontally, the transform can be performed on the topmost or bottommost block.

[0080] In addition, a low-frequency non-separable transform (LFNST) can be applied. LFNST is a secondary transform technique that further transforms the residual signal transformed into the frequency domain by DCT or DST. LFNST further transforms the 4×4 or 8×8 low-frequency region on the upper left side so that the residual coefficients can be concentrated on the upper left side.

[0081] The quantization unit 140 may generate a quantization level by quantizing the transform coefficient or the residual signal according to a quantization parameter (QP) and output the generated quantization level. Herein, the quantization unit 140 may quantize the transform coefficient by using a quantization matrix.

[0082] For example, a quantizer using a QP value of 0 to 51 may be used. Alternatively, if the image size is large and high coding efficiency is required, a QP of 0 to 63 may be used. In addition, a dependent quantization (DQ) method using two quantizers instead of one quantizer may be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even without using signaling information about a specific quantizer, a quantizer to be used for the next transform coefficient may be selected through a state transition model based on the current state.

[0083] The entropy encoding unit 150 may generate a bit stream by performing entropy encoding on the value calculated by the quantization unit 140 or on the decoding parameter value calculated when performing encoding according to probability distribution, and output the bit stream. The entropy encoding unit 150 may perform entropy encoding on information about samples of an image and information for decoding the image. For example, the information for decoding the image may include a syntax element.

[0084] When entropy coding is applied, symbols are represented so that a smaller number of bits are allocated to symbols with a high probability of occurrence and a larger number of bits are allocated to symbols with a low probability of occurrence, and therefore, the size of the bit stream for the symbol to be encoded can be reduced. The entropy coding unit 150 can perform entropy coding using a coding method such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. For example, the entropy coding unit 150 can perform entropy coding by using a variable length coding (VLC) table. In addition, the entropy coding unit 150 can derive a binarization method of a target symbol and a probability model of a target symbol / bin, and perform arithmetic decoding by using the derived binarization method and context model.

[0085] In this regard, when CABAC is applied, in order to reduce the size of the probability table stored in the decoding device, the table probability update method can be changed to a table update method using a simple equation and applied. In addition, two different probability models can be used to obtain more accurate symbol probability values.

[0086] In order to encode the transform coefficient level (quantization level), the entropy encoding unit 150 may change the two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method.

[0087] The decoding parameters may include information (flags, indexes, etc.) encoded in the encoding device 100 and sent to the decoding device 200 by signal (such as syntax elements) and information derived in the encoding or decoding process, and may mean information required when encoding or decoding an image.

[0088] Herein, signaling a flag or an index may mean that a corresponding flag or index is entropy encoded and included in a bitstream in an encoder, and may mean that a corresponding flag or index is entropy decoded from a bitstream in a decoder.

[0089] The encoded current image can be used as a reference image of another image to be processed later. Therefore, the encoding device 100 can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer 190.

[0090] The quantization level may be dequantized in the dequantization unit 160, or may be inversely transformed in the inverse transform unit 170. The dequantized and / or inversely transformed coefficient may be added to the prediction block by the adder 117. Herein, the dequantized and / or inversely transformed coefficient may mean a coefficient on which at least one of dequantization and inverse transformation is performed, and may mean a reconstructed residual block. The dequantization unit 160 and the inverse transform unit 170 may be performed as inverse processes of the quantization unit 140 and the transform unit 130.

[0091] The reconstructed block may pass through the 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 luminance mapping with chroma scaling (LMCS), etc. to the reconstructed sample, the reconstructed block, or the reconstructed image using all or some filtering techniques. The filter unit 180 may be referred to as an in-loop filter. In this case, the loop filter is also used as a name excluding LMCS.

[0092] The deblocking filter can remove block distortion generated in the boundary between blocks. In order to determine whether to apply the deblocking filter, it can be determined whether to apply the deblocking filter to the current block based on samples included in several rows or columns included in the block. When the deblocking filter is applied to the block, different filters can be applied according to the required deblocking filter strength.

[0093] In order to compensate for the encoding error using sample adaptive offset, an appropriate offset value may be added to the sample value. Sample adaptive offset may correct the offset of the deblocked image from the original image by sample units. A method of dividing the samples included in the image into a predetermined number of regions, determining the regions to which the offset is applied, and applying the offset to the determined regions, or a method of applying the offset in consideration of edge information about each sample may be used.

[0094] The bilateral filter (BIF) can also correct the deviation from the original image on a sample-by-sample basis for the deblocked image.

[0095] The adaptive loop filter may perform filtering based on the comparison result of the reconstructed image and the original image. The samples included in the image may be divided into predetermined groups, the filter to be applied to each group may be determined, and differential filtering may be performed for each group. Information on whether the ALF is applied may be signaled by a coding unit (CU), and the form and coefficient of the adaptive loop filter to be applied to each block may be changed.

[0096] In luma mapping with chroma scaling (LMCS), luma mapping (LM) means remapping luma values ​​by a piecewise linear model, and chroma scaling (CS) means a technique for scaling residual values ​​of chroma components according to an average luma value of a prediction signal. Specifically, LMCS can be used as an HDR correction technique that reflects the characteristics of a high dynamic range (HDR) image.

[0097] The reconstructed block or the reconstructed image that has passed through the filter unit 180 may be stored in the reference picture buffer 190. The reconstructed block that has passed through the filter unit 180 may be a part of the reference image. That is, the reference image is a reconstructed image composed of the reconstructed block that has passed through the filter unit 180. The stored reference image may be used later in inter-frame prediction or motion compensation.

[0098] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.

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

[0100] refer to Figure 2 , the decoding device 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 201, a switch 203, a filter unit 260 and a reference picture buffer 270.

[0101] The decoding device 200 may receive a bit stream output from the encoding device 100. The decoding device 200 may receive a bit stream stored in a computer-readable recording medium, or may receive a bit stream streamed through a wired / wireless transmission medium. The decoding device 200 may decode the bit stream in an intra-frame mode or an inter-frame mode. In addition, the decoding device 200 may generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.

[0102] When the prediction mode for decoding is the intra mode, the switch 203 may be switched to intra. Alternatively, when the prediction mode for decoding is the inter mode, the switch 203 may be switched to inter.

[0103] The decoding device 200 can obtain a reconstructed residual block by decoding the input bit stream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 can generate a reconstructed block that becomes a decoding target by adding the reconstructed residual block and the prediction block. The decoding target block can be referred to as a current block.

[0104] The entropy decoding unit 210 may generate symbols by entropy decoding the bit stream according to the probability distribution. The generated symbols may include symbols in the form of quantization levels. In this article, the entropy decoding method may be an inverse process of the above entropy encoding method.

[0105] The entropy decoding unit 210 may change the coefficients of the one-dimensional vector shape into coefficients of the two-dimensional block shape through a transform coefficient scanning method to decode the transform coefficient level (quantization level).

[0106] The quantization level may be dequantized in the dequantization unit 220 or inversely transformed in the inverse transform unit 230. The quantization level may be a result of dequantization and / or inverse transformation and may be generated as a reconstructed residual block. In this article, the dequantization unit 220 may apply a quantization matrix to the quantization level. The dequantization unit 220 and the inverse transform unit 230 applied to the decoding device may apply the same technology as the dequantization unit 160 and the inverse transform unit 170 applied to the above-mentioned encoding device.

[0107] When the intra mode is used, the intra prediction unit 240 can generate a prediction block by performing spatial prediction on the current block using sample values ​​of blocks decoded around the decoding target block. The intra prediction unit 240 applied to the decoding device can apply the same technology as the intra prediction unit 120 applied to the above encoding device.

[0108] When the inter-frame 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. When the value of the motion vector is not an integer value, the motion compensation unit 250 can generate a prediction block by applying an interpolation filter to a partial area within the reference image. In order to perform motion compensation, it can be determined based on the decoding unit whether the motion compensation method of the prediction unit included in the corresponding decoding unit is a skip mode, a merge mode, an AMVP mode, or a current picture reference mode, 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 above-mentioned encoding device.

[0109] The adder 201 can generate a reconstructed block by adding the reconstructed residual block and the prediction 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 reconstructed block or the reconstructed image. The filter unit 260 applied to the decoding device can apply the same filtering technology as the filtering technology applied to the filter unit 180 applied to the above-mentioned encoding device.

[0110] The filter unit 260 may output a reconstructed image. The reconstructed block or the reconstructed image may be stored in the reference picture buffer 270 and used for inter-frame prediction. The reconstructed block that has passed through the filter unit 260 may be a part of the reference image. That is, the reference image may be a reconstructed image composed of the reconstructed blocks that have passed through the filter unit 260. The stored reference image may be used later in inter-frame prediction or motion compensation.

[0111] Figure 3 is a diagram schematically showing a video decoding system to which the present invention is applicable.

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

[0113] The encoding device 10 according to the embodiment may include a video source generating unit 11, an encoding unit 12, and a transmission unit 13. The decoding device 20 according to the embodiment may include a receiving 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 receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, and the display unit may be configured as a separate device or an external component.

[0114] The video source generation unit 11 can obtain the video / image by capturing, synthesizing or generating the video / image process. The video source generation unit 11 may include a video / image capture device and / or a video / image generation device. The video / image capture device may, for example, include one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may, for example, include a computer, a tablet computer, a smart phone, etc., and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc., in which case the video / image capture process may be replaced by a process that generates relevant data.

[0115] The encoding unit 12 may encode the input video / image. The encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit 12 may output encoded data (encoded video / image information) in the form of a bit stream. The detailed configuration of the encoding unit 12 may also be the same as described above. Figure 1 The encoding device 100 is configured in the same manner.

[0116] The transmission unit 13 can transmit the encoded video / image information or data output in the form of a bit stream to the receiving unit 21 of the decoding device 20 in the form of a file or streaming through a digital storage medium or a network. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit 13 may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiving unit 21 may extract / receive a bit stream from a storage medium or a network and transmit it to the decoding unit 22.

[0117] The decoding unit 22 can decode the video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction. The detailed configuration of the decoding unit 22 can also be the same as that described above. Figure 2 The decoding device 200 is configured in the same manner.

[0118] The rendering unit 23 may render the decoded video / image. The rendered video / image may be displayed by the display unit.

[0119] In the present invention, various embodiments of a method for determining an intra prediction mode of a chroma block are described.

[0120] The intra prediction mode applicable to the luminance block can be applied to the chrominance block. In addition, the cross component linear model (CCLM) mode for predicting the chrominance block based on the sample value of the reconstructed luminance block can also be applied to the chrominance block. In the present invention, the intra prediction mode other than the CCLM mode is defined as a non-CCLM mode.

[0121] In the CCLM mode, the relationship between the luminance component samples and the chrominance component samples is defined as a linear model. At this time, in order to determine the linear model, the adjacent samples of the current chrominance block and the adjacent samples of the current luminance block can be referenced. For example, the linear model can be determined by referring to the left sample and the upper sample of the current chrominance block and the left sample and the upper sample of the current luminance block. In addition, in some embodiments, the linear model can be determined by referring only to the left sample or the upper sample.

[0122] In addition, according to the linear model, the sample value of the current chrominance block can be derived from the sample value of the current luminance block. At this time, the current luminance block and the current chrominance block correspond to each other in position and size. In addition, the position of the sample of the current chrominance block and the position of the sample of the current luminance block referenced by the sample of the current chrominance block correspond to each other.

[0123] According to an embodiment, in order to determine the intra prediction mode of the chroma block, a chroma intra prediction mode candidate group may be determined. In addition, the intra prediction mode of the chroma block may be selected from the candidates of the chroma intra prediction mode candidate group. The chroma intra prediction mode candidate group may include not only the CCLM mode, but also the intra prediction mode that can be applied to the luminance block (e.g., DC mode, planar mode, directional intra prediction mode, etc.).

[0124] According to an embodiment, the chroma intra-frame prediction mode candidate group of the current chroma block may include N non-CCLM modes. N may be an integer greater than or equal to 5. The N non-CCLM modes may be composed of M default modes and the intra-frame prediction mode of the current luminance block corresponding to the current chroma block. M is an integer less than N. The M default modes may include at least one of a DC mode, a planar mode, a vertical mode, and a horizontal mode. Alternatively, the chroma intra-frame prediction mode candidate group may be composed only of the intra-frame prediction modes of the blocks related to the current chroma block, without a default mode.

[0125] According to an embodiment, the chroma intra prediction mode candidate group of the current chroma block may further include one or more CCLM modes. The one or more CCLM modes may include at least one of the LT_CCLM mode that refers to both the left reference area and the upper reference area of ​​the current chroma block and the current luminance block, the L_CCLM mode that refers only to the left reference area of ​​the current chroma block and the current luminance block, and the T_CCLM mode that refers to the upper reference area of ​​the current chroma block and the current luminance block. As described above, a linear model between samples of the current chroma block and the current luminance block is determined based on the reference areas of the current chroma block and the current luminance block.

[0126] According to an embodiment, in the chroma intra prediction mode candidate group, the chroma intra prediction mode candidates can be sequentially derived according to the method according to the setting order. At this time, the method of deriving four chroma intra prediction mode candidates is described in the present invention. In addition, four chroma intra prediction mode sets are derived through four chroma intra prediction mode candidates, and the chroma intra prediction mode candidate group can be determined according to the intra prediction modes of the four chroma intra prediction mode sets.

[0127] At this time, the four chroma intra prediction mode sets may include: a first set including multiple direct modes (MDMs); a second set including intra prediction modes of adjacent chroma blocks of the current chroma block; a third set including intra prediction modes of adjacent luminance blocks of the current luminance block; a fourth set including secondary intra prediction modes; and a fifth set including a default mode. When the chroma intra prediction mode candidate group of the current chroma block includes nine chroma intra prediction modes, nine non-overlapping chroma intra prediction modes in the four chroma intra prediction mode sets may be sequentially added to the chroma intra prediction mode candidate group in a predetermined order.

[0128] Multiple direct modes are intra-prediction modes derived from multiple luminance blocks corresponding to the current chrominance block. In the case of a single tree structure, the luminance image and the chrominance image are divided according to the same tree structure. Therefore, when a single tree structure is applied, one chrominance block may correspond to only one luminance block. However, in the case of a dual tree structure, the luminance image and the chrominance image may be divided according to different tree structures. Therefore, one chrominance block may correspond to multiple luminance blocks. The dual tree structure may be mainly applied to intra-pictures to which only intra-prediction is applied.

[0129] The dual tree structure can be applied to an intra picture to which only intra prediction is applied, and the efficiency of deriving the intra prediction mode of the chroma block can be increased by using multiple direct modes that derive two or more chroma intra prediction mode candidates from two or more luminance blocks related to the chroma block position.

[0130] According to an embodiment, the plurality of luminance blocks corresponding to the current chrominance block may include luminance blocks at the center (C), upper right (TR), upper left (TL), lower right (BR), and lower left (BL) positions corresponding to the current chrominance block. The positions referenced by the plurality of direct modes are merely examples and may include a left position, a right position, an upper position, and a lower position. In addition, the number of positions referenced by the plurality of direct modes is determined to be two or more, and the positions referenced by the plurality of direct modes may be selected from the above positions.

[0131] The first set sequentially includes intra prediction modes derived from a plurality of direct modes. At this time, the first set may include up to five intra prediction modes derived from a plurality of luminance blocks included in a current luminance block corresponding to a current chrominance block. At this time, the first set may include intra prediction modes in a predetermined order relative to a reference position. For example, the predetermined order may be the order of C, TR, TL, BR, and BL. The above order is only an example, and the order may be changed according to the implementation.

[0132] In the process of including the intra prediction modes in the first set, it is checked whether the intra prediction modes derived from the multiple direct modes overlap. In addition, only non-overlapping intra prediction modes are added to the first set. The intra prediction modes derived from the multiple direct modes are added to the first set in an arbitrary order. The intra prediction modes included in the first set are included in the chroma intra prediction mode candidate group.

[0133] In addition, in the process of constructing the first set, if the maximum number of intra prediction modes of the chroma intra prediction mode candidate group is all determined, the process of constructing the first set is terminated. Then, based on the first set, the chroma intra prediction mode candidate group is determined, and the construction of the second set is not performed.

[0134] The second set may include intra prediction modes of adjacent chroma blocks of the current chroma block. The intra prediction modes of the current chroma block and the adjacent chroma block may be the same. Therefore, the intra prediction mode of the adjacent chroma block may be included in the chroma intra prediction mode candidate group, so that the intra prediction mode of the adjacent chroma block can also be applied to the current block.

[0135] At this time, the intra prediction modes of the left chroma block, the upper chroma block, the upper right chroma block, the lower left chroma block, and the upper left chroma block of the current chroma block may be sequentially included in the second set. In some embodiments, the position of the referenced adjacent chroma block may be changed. In addition, in some embodiments, only the left chroma block and the upper chroma block of the current chroma block may be referenced.

[0136] When constructing the second set, it may be determined whether the intra prediction modes of adjacent chroma blocks overlap. In other words, it may be determined whether the intra prediction modes of adjacent chroma blocks are already included in the chroma intra prediction mode candidate group. In addition, if the intra prediction mode of the adjacent chroma block is not included in the chroma intra prediction mode candidate group, the intra prediction mode may be included in the second set. The intra prediction mode included in the second set is included in the chroma intra prediction mode candidate group.

[0137] According to an embodiment, if the number of intra prediction modes of the first set is less than the maximum number of candidates of the chroma intra prediction mode candidate group, the second set may be determined. In addition, in the process of constructing the second set, if the intra prediction modes of the maximum number of candidates of the chroma intra prediction mode candidate group are all determined, the process of constructing the second set is terminated. Then, based on the first set and the second set, the chroma intra prediction mode candidate group is determined, and the construction of the third set is not performed.

[0138] The third set may include intra prediction modes of neighboring luminance blocks of the current luminance block corresponding to the current chrominance block. The current luminance block used to determine the third set is determined to include all luminance samples corresponding to the positions of the chrominance samples of the current chrominance block. Therefore, the current luminance block used to determine the third set may be a block that can still be segmented, rather than a block that has already been segmented.

[0139] With reference to the surrounding position of the current luminance block, the adjacent luminance blocks used to determine the third set may be determined. At this time, the intra-frame prediction modes of the left luminance block, the upper luminance block, the upper right luminance block, the lower left luminance block, and the upper left luminance block of the current luminance block may be sequentially included in the third set. In some embodiments, the position of the adjacent luminance block referenced may be changed. In addition, in some embodiments, only the left luminance block and the upper luminance block of the current luminance block may be referenced.

[0140] When constructing the third set, it may be determined whether the intra prediction modes of adjacent luminance blocks overlap. In other words, it may be determined whether the intra prediction modes of adjacent luminance blocks have been included in the chrominance intra prediction mode candidate group. In addition, if the intra prediction modes of adjacent luminance blocks are not included in the chrominance intra prediction mode candidate group, the intra prediction modes may be included in the third set. The intra prediction modes included in the third set are included in the chrominance intra prediction mode candidate group.

[0141] According to an embodiment, if the number of intra prediction modes of the first set and the second set is less than the maximum number of candidates of the chroma intra prediction mode candidate group, the third set may be determined. In addition, in the process of constructing the third set, if the intra prediction modes of the maximum number of candidates of the chroma intra prediction mode candidate group are all determined, the process of constructing the third set is terminated. Then, based on the first set to the third set, the chroma intra prediction mode candidate group is determined, and the construction of the fourth set is not performed.

[0142] The fourth set may include a secondary intra prediction mode derived from the first or second intra prediction mode of the chroma intra prediction mode candidate group. That is, the fourth set may include a secondary intra prediction mode derived from an intra prediction mode included in one of the first to third sets. In some embodiments, the fourth set may include a secondary intra prediction mode derived from the third or subsequent intra prediction mode of the chroma intra prediction mode candidate group.

[0143] The secondary intra prediction mode may include an intra prediction mode whose index value is 1 greater or less than the index value of the first intra prediction mode of the chroma intra prediction mode candidate group. In some embodiments, the difference between the index value of the first intra prediction mode and the index value of the secondary chroma intra prediction mode may be 2 or greater. After deriving the secondary intra prediction mode from the first intra prediction mode, the secondary intra prediction mode may be further derived from the second intra prediction mode. If the third or subsequent intra prediction mode of the chroma intra prediction mode candidate group can be referenced, the secondary intra prediction mode may be further derived from the third or subsequent intra prediction mode.

[0144] When constructing the fourth set, it may be determined whether the secondary intra prediction modes overlap. In other words, it may be determined whether the secondary intra prediction mode is already included in the chroma intra prediction mode candidate group. In addition, if the secondary intra prediction mode is not included in the chroma intra prediction mode candidate group, the secondary intra prediction mode may be included in the fourth set. The intra prediction mode (secondary intra prediction mode) included in the fourth set is included in the chroma intra prediction mode candidate group.

[0145] According to an embodiment, if the number of intra prediction modes of the first to third sets is less than the maximum number of candidates of the chroma intra prediction mode candidate group, the fourth set may be determined. In addition, in the process of constructing the fourth set, if the intra prediction modes of the maximum number of candidates of the chroma intra prediction mode candidate group are all determined, the process of constructing the fourth set is terminated. Then, based on the first to fourth sets, the chroma intra prediction mode candidate group is determined, and the construction of the fifth set is not performed.

[0146] The fifth set includes preset default modes. According to an embodiment, the default mode may include a plane mode, a vertical mode, a horizontal mode, a DC mode, a diagonal mode in the upper right direction, a diagonal mode in the upper left direction, a diagonal mode in the lower left direction, an intra-frame prediction mode with an index value greater than 4 of the index value of the vertical mode, an intra-frame prediction mode with an index value less than 4 of the index value of the vertical mode, an intra-frame prediction mode with an index value greater than 4 of the index value of the horizontal mode, and one or more of an intra-frame prediction mode with an index value less than 4 of the index value of the horizontal mode. In some embodiments, the default mode may also include other intra-frame prediction modes. The default modes may be included in the fifth set in any order.

[0147] When constructing the fifth set, it may be determined whether the default mode overlaps. For example, it may be determined whether the default mode has been included in the chroma intra prediction mode candidate group. In addition, if the default mode is not included in the chroma intra prediction mode candidate group, the default mode may be included in the fifth set. The intra prediction mode (default mode) included in the fifth set is included in the chroma intra prediction mode candidate group.

[0148] According to an embodiment, if the number of intra prediction modes of the first to fourth sets is less than the maximum number of candidates of the chroma intra prediction mode candidate group, the fifth set may be determined. In addition, in the process of constructing the fifth set, if the intra prediction modes of the maximum number of candidates of the chroma intra prediction mode candidate group are all determined, the process of constructing the fifth set is terminated.

[0149] The determination order of the first set to the fifth set in the chroma intra prediction mode candidate group may be changed according to the implementation. For example, the order of the second set and the third set may be changed. Alternatively, the order of the first set and the second set, and the order of the first set and the third set may also be changed. Alternatively, the fifth set including the default mode may be first included in the chroma intra prediction mode candidate group, and the first set to the fourth set may be included in the chroma intra prediction mode candidate group in a predetermined order.

[0150] In addition, according to an embodiment, a chroma intra prediction mode candidate group may be determined based on some of the first to fifth sets. For example, the chroma intra prediction mode candidate group may be determined using only the first to second sets. Alternatively, the chroma intra prediction mode candidate group may be determined using only the first to third sets. Alternatively, the chroma intra prediction mode candidate group may be determined using only the first, second, and fourth sets. In addition, the fifth set may also be included in the chroma intra prediction mode candidate group according to an embodiment. The order of the sets used in the chroma intra prediction mode candidate group in the first to fifth sets may be changed according to an embodiment.

[0151] According to an embodiment, a chroma intra prediction mode set (sixth set) consisting of intra prediction modes applied to chroma blocks encoded or decoded before the current chroma block may be used to determine a chroma intra prediction mode candidate group. The sixth set may include intra prediction modes for chroma blocks adjacent to the current chroma block in encoding or decoding order, even if they are not spatially adjacent to the current chroma block.

[0152] The chroma block referenced in the sixth set can be derived from the chroma intra mode history list. The chroma intra mode history list can be generated for each predetermined unit. For example, an independent chroma intra mode history list can be generated for each slice or coding tree block. If the current chroma block is intra-predicted, the intra prediction mode first added in the list can be excluded from the chroma intra mode history list. On the contrary, the intra prediction mode applied to the current chroma block is included in the list. If the intra prediction mode of the current chroma block is already included in the chroma intra mode history list, the intra prediction mode is not excluded from the list. On the contrary, the order of the intra prediction modes in the list is changed so that the intra prediction mode applied to the current chroma block is assigned to a predetermined position in the list. The predetermined position is the position assigned to the intra prediction mode that most recently entered the list in the list.

[0153] The order in which the intra-frame prediction modes of the sixth set are included in the chroma intra-frame prediction mode set may be determined differently depending on the implementation. According to the implementation, after the intra-frame prediction modes of the first to third sets are included in the chroma intra-frame prediction mode set, the intra-frame prediction modes of the sixth set may be included in the chroma intra-frame prediction mode set. Alternatively, after the intra-frame prediction modes of the first to fourth sets are included in the chroma intra-frame prediction mode set, the intra-frame prediction modes of the sixth set may be included in the chroma intra-frame prediction mode set. In the case where the intra-frame prediction modes of the sixth set are included in the chroma intra-frame prediction mode set, a redundancy check applied to the intra-frame prediction modes of the first to fifth sets may be performed.

[0154] Figure 4 Luma blocks and chroma blocks for explaining chroma intra prediction modes included in the first to third sets are shown.

[0155] according to Figure 4 , the positions of multiple luminance blocks referenced in multiple direct modes will be explained.

[0156] The current chroma block 400 corresponds to the current luminance block 410. When the color format is 4:4:4, the size of the current chroma block may be set to be the same as the size of the current luminance block. In addition, when the color format is 4:2:2, the area of ​​the current chroma block may be set to half the area of ​​the current luminance block. In addition, when the color format is 4:2:0, the size of the current chroma block may be set to 1 / 4 of the size of the current luminance block. Figure 4 A current luma block 410 corresponding to the current chroma block 400 is shown when the color format is 4:2:0.

[0157] according to Figure 4, the current luma block 410 is additionally divided, unlike the current chroma block 400. Therefore, the current chroma block 400 may correspond to a plurality of blocks divided from the current luma block 410. Some of the plurality of blocks may be referenced in a plurality of direct modes.

[0158] To determine the first set, the C, TR, TL, BR, and BL positions of the current luminance block 410 may be referenced. Five blocks 412, 414, 416, 418, and 420 corresponding to the C, TR, TL, BR, and BL positions of the current luminance block 410 may be used in a plurality of direct modes. Therefore, the first set may include intra-prediction modes of the blocks 412, 414, 416, 418, and 420. The first set may include intra-prediction modes of the five blocks 412, 414, 416, 418, and 420 in sequence. However, the order of the intra-prediction modes included in the first set may be arbitrarily changed.

[0159] At this time, according to the redundancy check, the first set may include intra prediction modes that do not overlap with intra prediction modes already included in the first set. The intra prediction modes included in the first set may be included in the chroma intra prediction mode candidate group.

[0160] To determine the second set, reference may be made to neighboring positions C1, C2, C3, C4, and C5 of the current chroma block 400. The intra prediction modes of the second set may be determined from five blocks 422, 424, 426, 428, and 430 corresponding to C1, C2, C3, C4, and C5 of the current chroma block 400. The second set may sequentially include intra prediction modes of the five blocks 422, 424, 426, 428, and 430. However, the order of the intra prediction modes included in the second set may be arbitrarily changed.

[0161] Although it will Figure 4 The position of C1 in the above example is determined as the lowest sample among the left samples of the current chroma block 400, but according to the embodiment, it can be determined as the highest sample or the center sample among the left samples of the current chroma block 400. Figure 4 The position of C2 is determined as the rightmost sample among the upper samples of the current chroma block 400 , but according to an embodiment, it may be determined as the leftmost sample or the center sample among the upper samples of the current chroma block 400 .

[0162] According to the redundancy check, the second set may include intra prediction modes that do not overlap with intra prediction modes already included in the first set and the second set. The intra prediction modes included in the second set may be included in the chroma intra prediction mode candidate group.

[0163] To determine the third set, reference may be made to neighboring positions L1, L2, L3, L4, and L5 of the current luma block 410. The intra prediction modes of the third set may be determined from five blocks 432, 434, 436, 438, and 440 corresponding to L1, L2, L3, L4, and L5 of the current chroma block 400. The third set may sequentially include intra prediction modes of the five blocks 432, 434, 436, 438, and 440. However, the order of the intra prediction modes included in the third set may be arbitrarily changed.

[0164] Although it will Figure 4 The position of L1 in the above example is determined as the lowest sample among the samples on the left side of the current luminance block 410. However, according to the embodiment, it can be determined as the highest sample or the center sample among the samples on the left side of the current luminance block 410. Figure 4 The position of L2 is determined as the rightmost sample among the upper samples of the current luminance block 410 , but according to an embodiment, it may be determined as the leftmost sample or the center sample among the upper samples of the current luminance block 410 .

[0165] According to the redundancy check, the third set may include intra prediction modes that do not overlap with the intra prediction modes already included in the first to third sets. The intra prediction modes included in the third set may be included in the chroma intra prediction mode candidate group.

[0166] Figure 5 A flowchart of a method for determining a candidate group of chroma intra prediction modes according to the first to fifth sets is shown.

[0167] In step 502, the intra prediction modes of the first set constructed with the plurality of direct modes are included in the chroma intra prediction mode candidate group. Then, in step 504, it is determined whether the chroma intra prediction mode candidate group is completed in step 502. If additional intra prediction mode candidates are required for the chroma intra prediction mode candidate group, step 506 is performed. Then, if the chroma intra prediction mode candidate group is completed, the method is terminated.

[0168] In step 506, the intra prediction mode of the second set constructed by referring to the neighboring blocks of the current chroma block is included in the chroma intra prediction mode candidate group. Then, in step 508, it is determined whether the chroma intra prediction mode candidate group is completed in step 506. If additional intra prediction mode candidates are required for the chroma intra prediction mode candidate group, step 510 is performed. Then, if the chroma intra prediction mode candidate group is completed, the method is terminated.

[0169] In step 510, the intra prediction mode of the third set constructed by referring to the neighboring blocks of the current luma block is included in the chroma intra prediction mode candidate group. Then, in step 512, it is determined whether the chroma intra prediction mode candidate group is completed in step 510. If additional intra prediction mode candidates are required for the chroma intra prediction mode candidate group, step 514 is performed. Then, if the chroma intra prediction mode candidate group is completed, the method is terminated.

[0170] In step 514, the intra prediction modes of the fourth set constructed with the secondary intra prediction mode are included in the chroma intra prediction mode candidate group. Then, in step 516, it is determined whether the chroma intra prediction mode candidate group is completed in step 514. If additional intra prediction mode candidates are required for the chroma intra prediction mode candidate group, step 518 is performed. Then, if the chroma intra prediction mode candidate group is completed, the method is terminated.

[0171] In step 518, the intra prediction modes of the fifth set constructed in the default mode are included in the chroma intra prediction mode candidate group.

[0172] In some embodiments, in step 502, the intra prediction modes of the sets other than the first set may be included in the chroma intra prediction mode candidate group. In addition, in steps 506, 510, 514, and 518, the intra prediction modes included in the chroma intra prediction mode candidate group may also be the intra prediction modes other than the first set. Figure 5 A collection other than the one indicated in .

[0173] In some embodiments, instead of five sets being sequentially included in the chroma intra prediction mode candidate group, three to four sets may be sequentially included in the chroma intra prediction mode candidate group.

[0174] The step of including the intra prediction mode of the sixth set in the chroma intra prediction mode candidate group may be added to Figure 5 method.

[0175] The chroma intra prediction mode candidate group consisting of the intra prediction modes in the above five chroma intra prediction mode sets can be used to determine the intra prediction mode of the current chroma block. The intra prediction mode of the current chroma block can be determined from the chroma intra prediction mode candidate group.

[0176] In the encoder, chroma intra prediction mode information indicating the intra prediction mode of the current chroma block may be encoded from the chroma intra prediction mode candidate group. In addition, in the decoder, the encoded chroma intra prediction mode information may be decoded.

[0177] The chroma intra prediction mode information may be transmitted / parsed using truncated unary codewords. Table 1 shows truncated unary codewords for each index of a chroma intra prediction mode candidate group having nine chroma intra prediction modes. Depending on the intra prediction mode of the current chroma block, the chroma intra prediction mode information may have the values ​​described in Table 1.

[0178] [Table 1]

[0179] Chroma intra prediction mode list index Truncating unary codewords 1 0 or 1 2 10 or 01 3 110 or 001 4 1110 or 0001 5 11110 or 00001 6 111110 or 000001 7 1111110 or 0000001 8 11111110 or 00000001 9 11111111 or 00000000

[0180] According to an embodiment, the chroma intra prediction modes within the chroma intra prediction mode candidate group may be reordered by considering the priority of the chroma intra prediction mode within the chroma intra prediction mode candidate group. Table 2 below shows an example of chroma intra prediction mode candidates corresponding to the index of the chroma intra prediction mode candidate group.

[0181] [Table 2]

[0182] Chroma intra prediction mode candidate group index Chroma intra prediction mode candidates 1 Mode 1 2 Mode 2 3 Mode 3 4 Mode 4 5 Mode 5 6 Mode 6 7 Mode 7 8 Mode 8 9 Mode 9

[0183] In Table 2, Mode 1 to Mode 9 represent non-overlapping arbitrary intra prediction modes. According to the truncated unary codeword of Table 1, the chroma intra prediction mode information representing the chroma intra prediction mode selected from the chroma intra prediction mode candidate group is binarized and encoded.

[0184] As shown in Table 1, according to the binarization of the truncated unary codeword, fewer bits are assigned to indexes with small values, and more bits are assigned to indexes with large values. Therefore, by assigning an intra-frame prediction mode with a high selection probability to a higher index (an index with a small value) of the chroma intra-frame prediction mode candidate group, and assigning a mode with a relatively low selection probability to a lower index (an index with a large value) of the chroma intra-frame prediction mode candidate group, the amount of bits of the chroma intra-frame prediction mode information can be reduced. Therefore, by reordering the intra-frame prediction mode candidates of the chroma intra-frame prediction mode candidate group proposed above according to the selection probability, the encoding efficiency of the chroma intra-frame prediction mode information can be increased.

[0185] Hereinafter, a method for calculating the selection probability of an intra prediction mode candidate of a chroma intra prediction mode candidate group will be presented. First, a method for calculating the selection probability of an intra prediction mode of a chroma intra prediction mode candidate group using template matching and reordering the intra prediction modes of the chroma intra prediction mode candidate group accordingly will be described. Second, a method for calculating the selection probability of an intra prediction mode of a chroma intra prediction mode candidate group by considering the occurrence frequency of the chroma intra prediction mode and reordering the intra prediction modes of the chroma intra prediction mode candidate group accordingly will be described.

[0186] As described above, the intra prediction mode candidates in the chroma intra prediction mode candidate group may be reordered using template matching.

[0187] According to an embodiment, according to a method based on template matching reordering, it is determined whether each intra prediction mode candidate included in the chroma intra prediction mode candidate group of the current chroma block is suitable for the template of the current chroma block. Here, the template represents a predetermined peripheral range of the current chroma block. For example, the template may include a left adjacent sample range and an upper adjacent sample range of the current chroma block. An intra prediction mode with high prediction accuracy for a template adjacent to the current chroma block may also have high prediction accuracy for the current chroma block. Therefore, when reordering the chroma intra prediction mode candidate group of the current chroma block, the encoding efficiency of the chroma intra prediction mode information can be increased by assigning a high priority to an intra prediction mode with high applicability to the template of the current chroma block.

[0188] According to an embodiment, a prediction template for a template is generated according to the directionality of an intra-prediction mode candidate. In addition, in order to predict a template according to the directionality of an intra-prediction mode candidate, a reference sample adjacent to the template may be used. For example, an upper reference sample and a left reference sample of the template may be used for prediction of the template. In addition, an evaluation value of the intra-prediction mode candidate is calculated based on the difference between the pixels of the prediction template and the pixels of the reconstructed template. The evaluation value represents the prediction accuracy of the intra-prediction mode candidate of the template for the current chroma block, and it can be considered that the smaller the evaluation value, the higher the prediction accuracy of the intra-prediction mode candidate of the template for the current chroma block. The evaluation value may be calculated based on the pixels of the prediction template and the pixels of the reconstructed template by any of the following methods: the sum of absolute differences (SAD), the sum of squared errors (SSE), and the sum of absolute transform differences (SATD).

[0189] According to the evaluation value of each intra prediction mode candidate, the order of the intra prediction mode candidates of the chroma intra prediction mode candidate group for the current chroma block can be reordered. For example, an intra prediction mode candidate with a small evaluation value can be assigned to a higher index (an index with a small value), and an intra prediction mode candidate with a large evaluation value can be assigned to a lower index (an index with a large value). In this way, the template-based difference value for each chroma candidate mode in the chroma intra prediction mode list can be compared to readjust the position of each chroma candidate mode in the chroma intra prediction mode list.

[0190] Figure 6 The template of the current chroma block used in the template-based intra mode derivation method and the reference pixels of the template used to generate the prediction template are shown.

[0191] The current chroma block 600 is a block of size M×N. In addition, the template 610 of the current chroma block 600 includes a left template 612 of size L1×N and adjacent to the current chroma block 600 and an upper template 614 of size M×L2. Here, L1 and L2 are integer values ​​greater than or equal to 1. L1 and L2 can be determined to be the same value. Alternatively, L1 and L2 can be determined as values ​​proportional to M and N, respectively. In some embodiments, the template 610 may also include an upper left template 616 of size L1×L2 and adjacent to the current chroma block 600.

[0192] The template 610 of the current chroma block 600 can be predicted by the neighboring reference samples 620 around the reference template 610. The neighboring reference samples 620 may include 2(N+L2)+1 reference samples from the immediately left reference sample line 622 in the left template 612. In addition, the neighboring reference samples 620 may include 2(M+L1) reference samples from the immediately upper reference sample line 626 in the upper template 614.

[0193] According to an embodiment, the template 610 may be predicted by referring to the reference sample 630 below the left template 612 instead of the N+L2 reference samples 624 below the left reference sample line 622. In addition, the template 610 may be predicted by referring to the reference sample 632 on the right side of the upper template 614 instead of the M+L1 reference samples 628 on the right side of the upper reference sample line 626.

[0194] As described above, the intra prediction mode candidates in the chroma intra prediction mode candidate group may be reordered according to the occurrence frequency of the intra prediction mode.

[0195] Determine the occurrence frequency of each intra prediction mode candidate of the chroma intra prediction mode candidate group. For example, the occurrence frequency of the intra prediction mode candidate can be calculated from the intra prediction modes of the reference blocks of the first set to the third set. For example, according to Figure 4 , because each of the first to third sets refers to 5 reference blocks, a maximum of 15 reference blocks can be referred to when determining the occurrence frequency of the intra-frame prediction mode candidate. Therefore, the occurrence frequency of the intra-frame prediction mode candidate can be determined according to the intra-frame prediction modes of the maximum 15 reference blocks.

[0196] If two or more reference positions for determining a reference block indicate one reference block, the frequency of occurrence of the intra-frame prediction mode candidate may be determined according to the number of reference positions included in one reference block. Alternatively, conversely, the frequency of occurrence of the intra-frame prediction mode candidate may be determined regardless of the number of reference positions included in one reference block.

[0197] According to the frequency of occurrence of each intra-frame prediction mode candidate, the chroma intra-frame prediction mode candidate group can be reordered. For example, an intra-frame prediction mode candidate with a high frequency of occurrence can be assigned to a higher index (an index with a small value), and an intra-frame prediction mode candidate with a low frequency of occurrence can be assigned to a lower index (an index with a large value).

[0198] According to an embodiment, through the redundancy check of the first set to the third set described above, the intra prediction mode already included in the chroma intra prediction mode candidate group is no longer included in the chroma intra prediction mode candidate group. On the contrary, if the intra prediction mode derived for the first set to the third set according to the redundancy check is not included in the chroma intra prediction mode candidate group, the redundancy count of the intra prediction mode may be increased by 1. The redundancy count indicates the frequency of occurrence of the intra prediction mode candidate included in the chroma intra prediction mode candidate group.

[0199] In addition, the chroma intra prediction mode candidate group may be reordered according to the size of the redundancy count of each intra prediction mode candidate. For example, an intra prediction mode candidate with a large redundancy count may be assigned to a higher index (an index with a small value), and an intra prediction mode candidate with a small redundancy count may be assigned to a lower index (an index with a large value). By determining the frequency of occurrence of the intra prediction mode candidate using the redundancy count determined in the intra prediction mode candidate derivation process, the step of separately calculating the frequency of occurrence of the intra prediction mode candidate after determining the intra prediction mode candidate may be omitted.

[0200] According to an embodiment, the occurrence frequency of the intra prediction mode candidate may be determined based on all related blocks related to the current chrominance block. Figure 4 , only blocks at specific positions are used to determine the intra prediction modes of the first set to the third set. However, according to an embodiment, in order to determine the frequency of occurrence of the intra prediction mode candidates that have been determined, the intra prediction modes of all related blocks related to the current chrominance block may be considered. For example, by referring to the intra prediction modes of all blocks included in the current luminance block, the intra prediction modes of all adjacent chrominance blocks of the current chrominance block, and the intra prediction modes of all adjacent luminance blocks of the current luminance block, the frequency of occurrence of each intra prediction mode candidate may be determined. In addition, the chrominance intra prediction mode candidate group may be reordered according to the frequency of occurrence of each intra prediction mode candidate.

[0201] According to an embodiment, a block that is not adjacent to the current chroma block but is encoded (or decoded) before the current chroma block is encoded (or decoded) may also be considered as a related block of the current chroma block. For example, all chroma blocks included in a decoding tree block or slice in the current chroma block may be considered as related blocks of the current chroma block. Alternatively, among the chroma blocks included in the decoding tree block or slice included in the current chroma block, the chroma block most recently encoded (or decoded) from the current chroma block may be considered as a related block of the current chroma block. Whether a chroma block has been recently encoded (or decoded) may be determined based on whether the difference in the decoding order between the current chroma block and the encoding (or decoding) block is less than a predetermined value.

[0202] According to an embodiment, when determining the frequency of occurrence of an intra-frame prediction mode candidate, the area of ​​the reference block may be considered instead of the number of reference blocks. The total area of ​​one or more reference blocks using the intra-frame prediction mode candidate may be summed, and the occurrence frequency score may be determined based on the total area. Then, according to the frequency of occurrence score of each intra-frame prediction mode candidate, the chroma intra-frame prediction mode candidate group may be reordered. Then, according to the frequency of occurrence score, the chroma intra-frame prediction mode candidate group may be reordered. Alternatively, in some embodiments, when calculating the frequency of occurrence score, both the number and area of ​​the reference blocks of the intra-frame prediction mode candidate may be considered.

[0203] Figure 7 A block for determining the occurrence frequency of an intra prediction mode for reordering intra prediction mode candidates of a chroma intra prediction mode candidate group is shown.

[0204] Figure 7 The current chrominance block 700 and the current luminance block 710 corresponding thereto are shown. In addition, the current luminance block 710 includes eight blocks 712 to 726. Four left adjacent blocks 730, 732, 734 and 736, four upper adjacent blocks 742, 744, 746 and 748, and one upper left adjacent block 740 are adjacent to the current chrominance block 700. In addition, eight left adjacent blocks 750 to 764, eight upper adjacent blocks 772 to 786 and one upper left adjacent block 770 are adjacent to the current luminance block 710.

[0205] When the occurrence frequency of the intra prediction mode candidates is determined by referring to only the reference blocks of the first to third sets, the occurrence frequency of the intra prediction mode candidates is determined according to the four blocks 712, 716, 722, and 726 of the current luma block 710, the five blocks 732, 734, 740, 744, and 746 adjacent to the current chroma block 700, and the five blocks 756, 758, 770, 778, and 780 adjacent to the current luma block 710. According to an embodiment, since the block 726 includes both the reference positions C and BR, the intra prediction mode of the block 726 may be counted twice when calculating the occurrence frequency of the intra prediction mode candidates.

[0206] When the frequency of occurrence of intra-frame prediction mode candidates is determined from all blocks related to the current chroma block 700, the frequency of occurrence of intra-frame prediction mode candidates is determined from eight blocks 712 to 726 of the current luminance block 710, nine blocks 730 to 736 and 740 to 748 adjacent to the current chroma block 700, and 17 blocks 750 to 764 and 770 to 786 adjacent to the current luminance block 710.

[0207] However, blocks that are not adjacent to the current chroma block 700 or the current luma block 710 may be excluded from the calculation of the occurrence frequency. For example, chroma blocks 736 and 748 that are not adjacent to the current chroma block 700 and luma blocks 760, 762, 764, 782, 784, and 786 that are not adjacent to the current luma block 710 may be excluded from the calculation of the occurrence frequency.

[0208] When determining the frequency of occurrence of the intra prediction mode, the area of ​​the reference block may be considered. For example, since the area of ​​block 712 is four times the area of ​​block 714, the weight of block 712 may be determined to be four times the weight of block 714 when calculating the frequency of occurrence.

[0209] As discussed above, in some embodiments, the Figure 7 The occurrence frequency of the intra prediction mode candidates of the chroma intra prediction mode candidate group is determined by using some blocks in the luminance block and the chroma block.

[0210] In the present invention, a method of efficiently encoding or decoding an intra prediction mode candidate of a chroma intra prediction mode candidate group is proposed.

[0211] Table 1 shows the codewords for binarizing the index information of the nine intra prediction mode candidates of the chroma intra prediction mode candidate group using the truncated unary codeword. As shown in Table 1, fewer bits are allocated to indexes with small values, while more bits are allocated to indexes with large values. Therefore, by allocating indexes with small values ​​to intra prediction mode candidates with high selection probability, the encoding efficiency of the chroma intra prediction mode can be increased.

[0212] However, if the selection probabilities of the intra prediction mode candidates of the chroma intra prediction mode candidate group are almost similar, it may be efficient to binarize the index information into a fixed length code (FLC) instead of binarizing it into a truncated unary codeword. In the case where the index information is binarized into a fixed length code, it may be efficient to determine the number of intra prediction mode candidates of the chroma intra prediction mode candidate group as an exponent of 2. For example, the number of intra prediction mode candidates of the chroma intra prediction mode candidate group may be 2, 4, 8, 16, etc.

[0213] If the chroma intra prediction mode candidate group includes nine intra prediction mode candidates, dominant flag information can be used to efficiently transmit / parse index information. Table 3 shows a codeword for transmitting / parsing each index of a chroma intra prediction mode list having nine chroma intra prediction modes using dominant flag information.

[0214] [Table 3]

[0215] Chroma intra prediction mode candidate group index Codeword 1 0 or 1 2 1000 or 0000 3 1001 or 0001 4 1010 or 0010 5 1011 or 0011 6 1100 or 0100 7 1101 or 0101 8 1110 or 0110 9 1111 or 0111

[0216] As shown in Table 3, a codeword of 0 or 1 is assigned to the first intra prediction mode (index 1) of the chroma intra prediction mode candidate group. Therefore, only the main flag information is used to encode the first intra prediction mode (index 1). Thereafter, for the second chroma intra prediction mode (index 2) to the ninth chroma intra prediction mode (index 9) of the chroma intra prediction mode candidate group, the distinguishing bits of the main flag information used to distinguish them from the first chroma intra prediction mode and the remaining index information used to distinguish the eight intra prediction modes are used. When the chroma intra prediction mode candidate group includes nine intra prediction modes, the remaining index information may have a fixed length of 3 bits. When there is a special chroma intra prediction mode with a high usage frequency, the index information can be efficiently encoded / decoded by using the main flag as shown in Table 3.

[0217] Figure 8 An embodiment of the image decoding method according to the present invention is shown.

[0218] In step 802, a chroma intra prediction mode candidate group of the current chroma block is determined from a reference block of the current chroma block.

[0219] According to an embodiment, the reference block of the current chrominance block may include a plurality of luminance blocks divided from a current luminance block corresponding to the current chrominance block. The plurality of luminance blocks correspond to a plurality of reference positions of the current chrominance block, and the plurality of reference positions may include at least two positions of a center position, an upper left position, an upper right position, a lower left position, and a lower right position.

[0220] According to an embodiment, the reference block of the current chroma block may include a chroma block adjacent to the current chroma block. The block adjacent to the current chroma block may include at least one of a left chroma block, an upper chroma block, a lower left chroma block, an upper right chroma block, and an upper left chroma block of the current chroma block.

[0221] According to an embodiment, the reference block of the current chrominance block may include a luminance block adjacent to the current luminance block corresponding to the current chrominance block. The block adjacent to the current luminance block may include at least one of a left luminance block, an upper luminance block, a lower left luminance block, an upper right luminance block, and an upper left luminance block of the current luminance block.

[0222] According to an embodiment, in step 802, a step of including the intra prediction mode of the reference block of the current chroma block in the chroma intra prediction mode candidate group may be included, and when the number of intra prediction mode candidates included in the chroma intra prediction mode candidate group is less than a predetermined value, a step of including a secondary intra prediction mode derived from the intra prediction mode candidates included in the chroma intra prediction mode candidate group in the chroma intra prediction mode candidate group may be included. The secondary intra prediction mode may be an intra prediction mode whose index value is greater or less than the index value of the intra prediction mode candidate of the chroma intra prediction mode candidate group by a predetermined value.

[0223] According to an embodiment, in step 802, a step of including an intra-frame prediction mode derived from a reference block of a current chrominance block in a chrominance intra-frame prediction mode candidate group may be included, and a step of including a default mode in the chrominance intra-frame prediction mode candidate group may be included when the number of intra-frame prediction mode candidates included in the chrominance intra-frame prediction mode candidate group is less than a predetermined value.

[0224] According to an embodiment, in step 802, a step of extracting an intra-frame prediction mode from a reference block of the current chroma block may be included, and a step of including the extracted intra-frame prediction mode in the chroma intra-frame prediction mode candidate group when the extracted intra-frame prediction mode does not overlap with the intra-frame prediction mode candidate included in the chroma intra-frame prediction mode candidate group may be included.

[0225] In step 804, when the intra prediction mode candidates of the chroma intra prediction mode candidate group are determined, the intra prediction mode candidates of the chroma intra prediction mode candidate group for the current chroma block may be reordered according to the priorities of the intra prediction mode candidates.

[0226] According to an embodiment, the priority of the intra-frame prediction mode candidate may be determined based on the template of the current chroma block. The template is a reconstructed area having a predetermined size, and the template is adjacent to at least one of the left and upper directions of the current chroma block, and the priority of the intra-frame prediction mode candidate may be determined based on the difference between the reconstructed sample of the template and the predicted sample of the template predicted according to the intra-frame prediction mode candidate.

[0227] According to an embodiment, the priority of the intra prediction mode candidate may be determined based on a plurality of related blocks of the current chroma block. The priority of the intra prediction mode candidate may be determined by calculating the number of related blocks to which the intra prediction mode candidate is applied among the plurality of related blocks or the total area of ​​the related blocks. The related blocks of the current chroma block may include at least one of a luminance block included in a current luminance block corresponding to the current chroma block, a chroma block adjacent to the current chroma block, a luminance block adjacent to the current luminance block, and a chroma block decoded before decoding of the current chroma block.

[0228] In step 806, chroma intra prediction mode information indicating the intra prediction mode of the current chroma block is obtained from the chroma intra prediction mode candidate group.

[0229] According to an embodiment, the chroma intra-frame prediction mode information can be characterized by including the following items: main flag information indicating whether the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group is the intra-frame prediction mode of the current chroma block; and remaining index information, when the main flag information indicates that the intra-frame prediction mode of the current chroma block is not the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group, the remaining index information indicates the intra-frame prediction mode of the current chroma block among the remaining intra-frame prediction mode candidates other than the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group.

[0230] According to an embodiment, the chroma intra prediction mode information may be binarized according to a truncated unary codeword as shown in Table 1, or may be binarized according to a fixed length code.

[0231] In step 808, based on the chroma intra prediction mode information, an intra prediction mode of the current chroma block is determined from the chroma intra prediction mode candidate group.

[0232] Fig. 9 An embodiment of the image encoding method according to the present invention is shown.

[0233] In step 902, an intra prediction mode candidate group of the current chroma block may be determined from a reference block of the current chroma block.

[0234] In step 904, the intra prediction mode candidates of the chroma intra prediction mode candidate group of the current chroma block may be reordered according to the priorities of the intra prediction mode candidates.

[0235] For determining the intra prediction mode candidate groups in steps 902 and 904 , the determination method and reordering method of the intra prediction mode candidate groups described with respect to steps 802 and 804 may be applied.

[0236] In step 906, the intra prediction mode of the current chroma block may be determined.

[0237] In step 908, chroma intra prediction mode information indicating the intra prediction mode of the current chroma block may be encoded from the intra prediction mode candidate group. The chroma intra prediction mode information of step 908 may also be binarized like the chroma intra prediction mode information of step 808.

[0238] Fig.10 The following is an exemplary illustration of a content streaming system applicable according to an embodiment of the present invention.

[0239] like Fig.10 As shown, the content streaming system to which the embodiment of the present invention is applied may mainly include an encoding server, a streaming media server, a web server, a media storage, a user device and a multimedia input device.

[0240] The encoding server compresses the content received from the multimedia input device (such as a smart phone, camera, CCTV, etc.) into digital data to generate a bit stream and transmits it to the streaming server. As another example, if the multimedia input device (such as a smart phone, camera, CCTV, etc.) directly generates a bit stream, the encoding server can be omitted.

[0241] A bit stream may be generated by applying the image encoding method and / or the image encoding device according to the embodiments of the present invention, and in the process of transmitting or receiving the bit stream, the streaming server may temporarily store the bit stream.

[0242] The streaming media server transmits the multimedia data to the user device via the web server based on the user request, and the web server can act as an intermediary to inform the user of any available services. When the user requests the desired service from the web server, the web server transmits it to the streaming media server, and the streaming media server can transmit the multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server can control the command / response between the devices in the content streaming system.

[0243] The streaming media server can receive content from a media storage and / or an encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming media server can store the bitstream for a specific period of time.

[0244] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, tablet PCs, touch-screen tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.

[0245] Each server in the above-mentioned content streaming system may operate as a distributed server, in which case data received from each server may be distributed and processed.

[0246] The above embodiments may be performed in the encoding device and the decoding device in the same or corresponding manner. In addition, at least one embodiment of the above embodiments or a combination of at least one of the above embodiments may be used to encode / decode an image.

[0247] In the encoding device and the decoding device, the order of applying the above embodiments may be different. Alternatively, in the encoding device and the decoding device, the order of applying the above embodiments may be the same.

[0248] The above-described embodiments may be performed for each luminance signal and each chrominance signal. Alternatively, the above-described embodiments for the luminance signal and the chrominance signal may be performed identically.

[0249] In the above-mentioned embodiments, the method is described based on a flow chart with a series of steps or units, but the present invention is not limited to the order of the steps, but some steps can be performed simultaneously with other steps or in a different order. In addition, it should be understood by those skilled in the art that the steps in the flow chart are not mutually exclusive, and other steps can be added to the flow chart or some steps can be deleted from the flow chart without affecting the scope of the present invention.

[0250] The embodiments may be implemented in the form of program instructions executable by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include independent program instructions, data files, data structures, etc. or a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention, or may be known to those of ordinary skill in the field of computer software technology.

[0251] The bit stream generated by the encoding method according to the above-described embodiment may be stored in a non-transitory computer-readable recording medium. In addition, the bit stream stored in the non-transitory computer-readable recording medium may be decoded by the decoding method according to the above-described embodiment.

[0252] Examples of computer-readable recording media include magnetic recording media such as hard disks, floppy disks, and magnetic tapes; optical data storage media such as CD-ROMs or DVD-ROMs; magnetic optimal media such as floppy disks; and hardware devices such as read-only memory (ROM), random access memory (RAM), flash memory, etc., which are specially constructed to store and implement program instructions. Examples of the program instructions include not only machine language codes formatted by a decoder, but also high-level language codes that can be implemented by a computer using an interpreter. The hardware device can be configured to be operated by one or more software modules, or conversely configured to perform processing according to the present invention.

[0253] Although the present invention has been described with respect to specific items such as detailed elements and limited embodiments and drawings, these items are only provided to help a more comprehensive understanding of the present invention, and the present invention is not limited to the above embodiments. It will be appreciated by those skilled in the art that various modifications and changes can be made from the above description.

[0254] Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the full scope of the appended claims and their equivalents will fall within the scope and spirit of the present invention.

[0255] Industrial Applicability

[0256] The present invention can be used for an apparatus for encoding / decoding an image and a recording medium for storing a bit stream.

Claims

1. An image decoding method, include: Determine a chroma intra prediction mode candidate group for the current chroma block from a reference block of the current chroma block; reordering the intra prediction mode candidates of the chroma intra prediction mode candidate group for the current chroma block according to the priorities of the intra prediction mode candidates; Acquire chroma intra prediction mode information indicating the intra prediction mode of the current chroma block from the chroma intra prediction mode candidate group; as well as The intra prediction mode of the current chroma block is determined based on the chroma intra prediction mode information.

2. The image decoding method according to claim 1, in, The reference block of the current chrominance block includes a plurality of luminance blocks divided from a current luminance block corresponding to the current chrominance block.

3. The image decoding method according to claim 2, in, The plurality of luminance blocks correspond to a plurality of reference positions of the current chrominance block, and The multiple reference positions include at least two positions among a center position, an upper left position, an upper right position, a lower left position and a lower right position.

4. The image decoding method according to claim 1, in, The reference block of the current chroma block includes chroma blocks adjacent to the current chroma block.

5. The image decoding method according to claim 4, in, The chroma blocks adjacent to the current chroma block include at least one chroma block of a left chroma block, an upper chroma block, a lower left chroma block, an upper right chroma block, and an upper left chroma block of the current chroma block.

6. The image decoding method according to claim 1, in, The reference block of the current chrominance block includes a luminance block adjacent to a current luminance block, and the current luminance block corresponds to the current chrominance block.

7. The image decoding method according to claim 6, in, The luminance blocks adjacent to the current luminance block include at least one luminance block of a left luminance block, an upper luminance block, a lower left luminance block, an upper right luminance block, and a lower left luminance block of the current luminance block.

8. The image decoding method according to claim 1, in, Determining the chroma intra prediction mode candidate group of the current chroma block from the reference block of the current chroma block comprises: including the intra prediction mode of the reference block of the current chroma block in the chroma intra prediction mode candidate group; and When the number of intra prediction mode candidates included in the chroma intra prediction mode candidate group is less than a predetermined value, a secondary intra prediction mode derived from the intra prediction mode candidates included in the chroma intra prediction mode candidate group is included in the chroma intra prediction mode candidate group.

9. The image decoding method according to claim 8, in, The secondary intra prediction mode is an intra prediction mode having an index value greater or smaller by a predetermined value than an index value of an intra prediction mode candidate of the chroma intra prediction mode candidate group.

10. The image decoding method according to claim 1, in, Determining the chroma intra prediction mode candidate group of the current chroma block from the reference block of the current chroma block comprises: including an intra prediction mode derived from the reference block of the current chroma block in the chroma intra prediction mode candidate group; and When the number of intra prediction mode candidates included in the chroma intra prediction mode candidate group is less than a predetermined value, a default mode is included in the chroma intra prediction mode candidate group.

11. The image decoding method according to claim 1, in, Determining the chroma intra prediction mode candidate group of the current chroma block from the reference block of the current chroma block comprises: Extracting an intra prediction mode from the reference block of the current chroma block; and When the extracted intra prediction mode does not overlap with the intra prediction mode candidates included in the chroma intra prediction mode candidate group, the extracted intra prediction mode is included in the chroma intra prediction mode candidate group.

12. The image decoding method according to claim 1, in, The priorities of the intra prediction mode candidates are determined based on a template of the current chroma block.

13. The image decoding method according to claim 12, in, The template is a reconstruction area having a predetermined size, and the template is adjacent to at least one of a left side direction and an upper side direction of the current chroma block, and The priority of the intra prediction mode candidate is determined based on a difference between a reconstructed sample of the template and a predicted sample of the template predicted according to the intra prediction mode candidate.

14. The image decoding method according to claim 1, in, The priorities of the intra prediction mode candidates are determined based on a plurality of related blocks of the current chroma block.

15. The image decoding method according to claim 14, in, The priorities of the intra prediction mode candidates are determined by calculating the number of relevant blocks to which the intra prediction mode candidates are applied or calculating the total areas of the relevant blocks.

16. The image decoding method according to claim 14, in, The related blocks of the current chrominance block include at least one of a luminance block included in a current luminance block corresponding to the current chrominance block, a chrominance block adjacent to the current chrominance block, a luminance block adjacent to the current luminance block, and a chrominance block decoded before decoding the current chrominance block.

17. The image decoding method according to claim 1, in, The chroma intra prediction mode information includes: Main flag information indicating whether the first intra prediction mode candidate of the chroma intra prediction mode candidate group is the intra prediction mode of the current chroma block; and Remaining index information, when the main flag information indicates that the intra-frame prediction mode of the current chroma block is not the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group, the remaining index information indicates the intra-frame prediction mode of the current chroma block among the remaining intra-frame prediction mode candidates other than the first intra-frame prediction mode candidate of the chroma intra-frame prediction mode candidate group.

18. A method for encoding an image, include: Determine a chroma intra prediction mode candidate group for the current chroma block from a reference block of the current chroma block; reordering the intra prediction mode candidates of the chroma intra prediction mode candidate group for the current chroma block according to the priorities of the intra prediction mode candidates; Determining an intra prediction mode of the current chroma block; as well as Chroma intra prediction mode information indicating the intra prediction mode of the current chroma block from the chroma intra prediction mode candidate group is encoded.

19. A computer-readable recording medium for storing a bit stream generated by an image encoding method, the image encoding method include: Determine a chroma intra prediction mode candidate group for the current chroma block from a reference block of the current chroma block; reordering the intra prediction mode candidates of the chroma intra prediction mode candidate group for the current chroma block according to the priorities of the intra prediction mode candidates; Determining an intra prediction mode of the current chroma block; as well as Chroma intra prediction mode information indicating the intra prediction mode of the current chroma block from the chroma intra prediction mode candidate group is encoded.

20. A method for transmitting a bit stream generated by an image encoding method, the method include: Encoding the image based on the image encoding method; as well as transmitting a bitstream comprising the encoded image, Wherein, the image encoding method comprises: Determine a chroma intra prediction mode candidate group for the current chroma block from a reference block of the current chroma block; reordering the intra prediction mode candidates of the chroma intra prediction mode candidate group for the current chroma block according to the priorities of the intra prediction mode candidates; Determining an intra prediction mode of the current chroma block; and Chroma intra prediction mode information indicating the intra prediction mode of the current chroma block from the chroma intra prediction mode candidate group is encoded.

Citation Information

Cited By

  • Image processing method, processing equipment and storage medium

    CN120568063A