Image encoding / decoding method, method for transmitting bit stream, and recording medium having bit stream stored therein

By deriving multiple direct modes and performing intra prediction based on these modes, the problem of low high-resolution image encoding and decoding efficiency is solved, and more efficient image encoding and decoding is achieved, with strong adaptability.

CN118947112APending Publication Date: 2024-11-12LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380033663.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-04-12
Filing Date
2023-03-30
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently encode and decode high-resolution, high-quality images, resulting in increased transmission and storage costs.

Method used

By deriving multiple direct modes, the default mode and direct mode for chroma blocks are determined and intra prediction is performed based on these modes to improve image encoding and decoding efficiency.

Benefits of technology

It realizes improving image encoding and decoding efficiency, accurately deducing direct modes, solving the overlap problem between the default mode and multiple direct modes, and adaptively applying multiple direct modes according to the tree type.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118947112A_ABST
    Figure CN118947112A_ABST
Patent Text Reader

Abstract

An image encoding / decoding method, a bit stream transmission method, and a computer-readable recording medium for storing a bit stream are provided. An image decoding method according to the present disclosure is an image decoding method performed by an image decoding device, and may comprise the steps of: deriving a plurality of direct mode (DM) candidates for a chroma block; determining a default mode for the chroma block and one mode among a plurality of DM candidates based on first information obtained from the bitstream; and performing intra prediction on the chrominance block based on the determined mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method, a method of transmitting a bitstream, and a recording medium storing the bitstream, and to chroma intra prediction using a plurality of direct modes. Background Art

[0002] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, is increasing in various fields. As the resolution and quality of image data are improved, the amount of information or bit volume transmitted is relatively increased compared to existing image data. The increase in the amount of information or bit volume transmitted leads to an increase in transmission cost and storage cost.

[0003] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention

[0004] Technical issues

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

[0006] Another object of the present disclosure is to provide a method for deriving multiple direct modes.

[0007] Another object of the present disclosure is to provide a method capable of using a default mode and a plurality of direct modes as chroma intra prediction modes.

[0008] Another object of the present disclosure is to provide a method for encoding direct mode.

[0009] Another object of the present disclosure is to provide a method for eliminating overlap between a default mode and a plurality of direct modes.

[0010] Another object of the present disclosure is to provide a method for determining whether to apply a plurality of direct modes based on a type of tree.

[0011] Another object of the present disclosure is to provide a non-transitory computer-readable recording medium storing a bit stream generated by the image encoding method according to the present disclosure.

[0012] Another object of the present disclosure is to provide a non-transitory computer-readable recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.

[0013] Another object of the present disclosure is to provide a method of transmitting a bit stream generated by the image encoding apparatus according to the present disclosure.

[0014] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described herein will be apparent to those skilled in the art through the following description.

[0015] Technical Solution

[0016] An image decoding method according to one aspect of the present disclosure is an image decoding method performed by an image decoding device, and may include: deriving multiple direct mode (DM) candidates for a chroma block, determining a default mode for the chroma block and any one of the multiple DM candidates based on first information obtained from a bitstream, and performing intra-frame prediction on the chroma block based on the determined mode.

[0017] According to another aspect of the present disclosure, an image encoding method is an image encoding method performed by an image encoding device, and may include: deriving a plurality of direct mode (DM) candidates for a chroma block, determining a default mode for the chroma block and any one of the plurality of DM candidates, and intra-predicting the chroma block based on the determined mode. First information indicating the determined mode may be encoded in a bitstream.

[0018] A computer-readable recording medium according to another aspect of the present disclosure may store a bit stream generated by the image encoding method or apparatus of the present disclosure.

[0019] A transmitting method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding method or apparatus of the present disclosure.

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

[0021] Beneficial Effects

[0022] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.

[0023] In addition, according to the present disclosure, the performance of chroma intra prediction can be improved by more accurately deriving multiple direct modes.

[0024] In addition, according to the present disclosure, a plurality of direct modes may be derived while maintaining a default mode corresponding to a basic mode as a chroma intra prediction mode.

[0025] In addition, according to the present disclosure, by replacing a default mode that overlaps with a plurality of direct modes with another mode, the overlapping problem between the default mode and the plurality of direct modes may be solved.

[0026] In addition, according to the present disclosure, it is possible to adaptively apply multiple direct modes by determining whether to apply the multiple direct modes based on a tree type.

[0027] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 FIG. 4 is a diagram schematically showing a video encoding system to which an embodiment of the present disclosure is applicable.

[0029] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.

[0030] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.

[0031] Figure 4 is a diagram schematically showing an intra prediction unit of an image encoding device.

[0032] Figure 5 is a flow chart showing a method of encoding an image based on intra-frame prediction.

[0033] Figure 6 is a diagram schematically showing an intra prediction unit of an image decoding device.

[0034] Figure 7 is a flow chart showing a method of decoding an image based on intra prediction.

[0035] Figure 8 is a diagram illustrating the various locations where direct mode can be derived.

[0036] Fig. 9 is a diagram schematically showing an entropy encoding unit of an image encoding device.

[0037] Fig.10 is a flow chart illustrating an entropy encoding method.

[0038] Fig.11 is a diagram schematically showing an entropy decoder of an image decoding device.

[0039] Fig.12 is a flow chart illustrating an entropy decoding method.

[0040] Fig.13 is a flowchart illustrating a method of determining a chroma intra prediction mode according to an embodiment of the present disclosure.

[0041] Fig.14 is a flowchart showing an image encoding method according to an embodiment of the present disclosure.

[0042] Fig.15 is a flowchart showing an image decoding method according to an embodiment of the present disclosure.

[0043] Fig.16 is a flowchart illustrating a method for determining a chroma intra prediction mode according to another embodiment of the present disclosure.

[0044] Fig.17 is a flowchart illustrating a method of deriving multiple DM candidates according to another embodiment of the present disclosure.

[0045] Fig.18 is a flowchart illustrating a method of deriving multiple DM candidates according to another embodiment of the present disclosure.

[0046] Fig.19 is a flowchart illustrating a method for determining a chroma intra prediction mode according to another embodiment of the present disclosure.

[0047] Fig. 20 is a flowchart illustrating a method for determining a chroma intra prediction mode according to another embodiment of the present disclosure.

[0048] Fig.21 An example of a method of determining a chroma intra prediction mode according to another embodiment of the present disclosure is shown.

[0049] Fig. 22 is a diagram illustrating an example of a search order for different positions in a luma block.

[0050] Fig.23 is a flowchart illustrating an example of a method of adaptively determining whether to apply a plurality of direct modes.

[0051] Fig.24 is a diagram illustrating various positions where direct mode can be derived.

[0052] Fig.25 and Fig.26 is a flowchart illustrating a method of deriving multiple direct mode candidates according to another embodiment of the present disclosure.

[0053] Fig. 27 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION

[0054] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure may be implemented in various forms and is not limited to the embodiments described herein.

[0055] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.

[0056] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.

[0057] In the present disclosure, the terms first, second, etc. may be used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.

[0058] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not otherwise specified, these embodiments in which the components are integrated or the components are distributed are also included in the scope of the present disclosure.

[0059] In the present disclosure, the components described in each embodiment are not necessarily indispensable components, and some components may be optional components. Therefore, the embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, the embodiments including other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.

[0060] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.

[0061] In the present disclosure, "picture" generally means the basis of an image within a specific time period, and a slice / tile is a coding unit that constitutes a part of a picture. A picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).

[0062] In the present disclosure, "pixel" or "pel" may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.

[0063] In the present disclosure, a "unit" may refer to a basic unit of image processing. The unit may include at least one of a specific area of ​​the picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., Cb, Cr) blocks. In some cases, the unit may be used interchangeably with terms such as "sample array", "block" or "area". In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.

[0064] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block" or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".

[0065] In addition, in the present disclosure, "current block" may mean a block including both a luma component block and a chroma component block or a "luma block of the current block", unless explicitly stated as a chroma block. The luma component block of the current block may be expressed by an explicit description including a luma component block, such as "luma block" or "current luma block". In addition, the "chroma component block of the current block" may be expressed by an explicit description including a chroma component block, such as "chroma block" or "current chroma block".

[0066] In the present disclosure, the slash " / " or "," should be interpreted as indicating "and / or". For example, the expressions "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A, B, C" may mean "at least one of A, B and / or C".

[0067] In the present disclosure, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", and / or 3) both "A and B". In other words, in the present disclosure, the term "or" should be interpreted as indicating "additionally or alternatively".

[0068] Overview of Video Coding Systems

[0069] Figure 1is a diagram showing a video encoding system to which an embodiment of the present disclosure is applicable.

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

[0071] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit (encoder) 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit (decoder) 22, and a renderer 23. The encoding unit 12 may be referred to as a video / image encoding device, and the decoding unit 22 may be referred to as a video / image decoding device. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display and the display may be configured as a separate device or an external component.

[0072] The video source generator 11 may acquire a video / image by a process of capturing, synthesizing or generating a video / image. The video source generator 11 may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate a video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process of generating relevant data.

[0073] The encoding unit 12 may encode the input video / image. For compression and encoding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output the encoded data (encoded video / image information) in the form of a bitstream.

[0074] The transmitter 13 may obtain the encoded video / image information or data output in the form of a bit stream in the form of a file or stream through a digital storage medium or a network and forward it to the receiver 21 of the decoding device 20 or another external object. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter 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 transmitter 13 may be provided as a transmitting device separated from the encoding device 12, and in this case, the transmitting device may include: at least one processor that obtains the encoded video / image information or data output in the form of a bit stream; and a transmitting unit for transmitting the encoded video / image information or data in the form of a file or stream. The receiver 21 may extract / receive a bit stream from a storage medium or a network and transmit the bit stream to the decoding unit 22.

[0075] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operations of the encoding unit 12 , such as dequantization, inverse transformation, and prediction.

[0076] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.

[0077] Overview of Image Coding Equipment

[0078] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.

[0079] like Figure 2 As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.

[0080] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.

[0081] The image divider 110 may divide the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). The coding unit may be obtained by recursively dividing a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be divided into a plurality of coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the division of the coding unit, the quadtree structure may be applied first, and the binary tree structure and / or the ternary tree structure may be applied later. The encoding process according to the present disclosure may be performed based on the final coding unit that is no longer divided. The maximum coding unit may be used as the final coding unit, and the coding unit of a deeper depth obtained by dividing the maximum coding unit may also be used as the final coding unit. Here, the encoding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0082] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and send the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.

[0083] The intra prediction unit (intra predictor) 185 can predict the current block by referring to samples in the current picture. Depending on the intra prediction mode and / or intra prediction technology, the reference samples can be located in the neighbors of the current block or can be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0084] The inter-frame prediction unit (inter-frame predictor) 180 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame prediction unit 180 may configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter prediction unit 180 may use motion information of a neighboring block as motion information of a current block. In the case of skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion vector prediction (MVP) mode, a motion vector of a neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding a motion vector difference and an indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.

[0085] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may apply not only intra prediction or inter prediction, but also both intra prediction and inter prediction at the same time to predict the current block. The prediction method of applying both intra prediction and inter prediction to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copying (IBC) to predict the current block. Intra block copying may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure.

[0086] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be sent to the transformer 120.

[0087] The transformer 120 may generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size instead of square.

[0088] The quantizer 130 may quantize the transform coefficients and send them to the entropy encoder 190. The entropy encoder 190 may encode the quantization signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients of the block type into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0089] The entropy encoder 190 may perform various encoding methods, such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction other than quantized transform coefficients together or separately (e.g., values ​​of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in the present disclosure may be encoded and included in a bitstream through the above-described encoding process.

[0090] The bit stream may be transmitted through a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 190 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.

[0091] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.

[0092] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0093] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and send the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.

[0094] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding apparatus 100, prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus may be avoided and encoding efficiency may be improved.

[0095] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block for deriving (or encoding) the motion information in the current picture and / or the motion information of the reconstructed block in the picture. The stored motion information may be sent to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.

[0096] Overview of Image Decoding Equipment

[0097] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.

[0098] like Figure 3 As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame predictor 260, and an intra-frame prediction unit 265. The inter-frame predictor (inter-frame prediction unit) 260 and the intra-frame predictor (intra-frame prediction unit) 265 may be collectively referred to as a "prediction unit (predictor)". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.

[0099] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.

[0100] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image is reconstructed by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by partitioning the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).

[0101] The image decoding device 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The image decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the values ​​of the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive a bin corresponding to each syntax element in a bitstream, determine a context model using information of a decoding target syntax element, information of a neighboring block and a decoding target block, or information of a symbol / bin decoded at a previous stage, perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information related to prediction among the information decoded by the entropy decoder 210 may be provided to the prediction unit (inter-frame predictor 260 and intra-frame prediction unit 265), and the residual value (ie, quantized transform coefficient and related parameter information) on which entropy decoding is performed in the entropy decoder 210 may be input to the dequantizer 220. In addition, information about filtering among the information decoded by the entropy decoder 210 may be provided to the filter 240. In addition, a receiver (not shown) for receiving a signal output from the image encoding apparatus may be further configured as an internal / external element of the image decoding apparatus 200 , or the receiver may be a component of the entropy decoder 210 .

[0102] In addition, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or at least one of an intra-frame prediction unit 265.

[0103] The dequantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on a coefficient scanning order performed in an image encoding device. The dequantizer 220 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.

[0104] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0105] The prediction unit may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).

[0106] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) to be described later.

[0107] The intra predictor 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 is also applicable to the intra prediction unit 265.

[0108] The inter-frame predictor 260 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame predictor 260 may configure a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode of the current block.

[0109] The adder 235 can generate a reconstruction signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame predictor 260 and / or the intra-prediction unit 265). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as the reconstructed block. The description of the adder 155 is also applicable to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

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

[0111] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter-frame predictor 260. The memory 250 can store the motion information of the block for deriving (or decoding) the motion information in the current picture and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.

[0112] In the present disclosure, the embodiments described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame predictor 260 and the intra-frame predictor 265 of the image decoding device 200.

[0113] Intra prediction

[0114] The prediction may represent a prediction for generating a prediction sample of the current block based on a reference sample in a picture (current picture) to which the current block belongs. When intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include: a total of 2×nh samples including a sample of size nW×nH adjacent to the left boundary of the current block and a sample adjacent to the lower left, a total of 2×nW samples including a sample adjacent to the upper boundary of the current block and a sample adjacent to the upper right, and a sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include: a total of nH samples of size nW×nH adjacent to the right boundary of the current block, a total of nW samples adjacent to the lower boundary of the current block, and a sample adjacent to the lower right of the current block.

[0115] However, some neighboring reference samples of the current block have not been decoded or may not be available. In this case, the image decoding device 200 can construct neighboring reference samples to be used for prediction by replacing unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be constructed by interpolation of available samples.

[0116] When deriving neighboring reference samples, (i) the prediction samples may be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction samples may be derived based on reference samples existing in a specific (prediction) direction relative to the prediction samples among neighboring reference samples of the current block. The case of (i) may be referred to as a non-directional mode or a non-angular mode, and the case of (ii) may be referred to as a directional mode or an angular mode. In addition, the prediction samples may be generated by interpolating first and second neighboring samples in the opposite direction of the prediction direction of the intra prediction mode of the current block based on the prediction samples of the current block among the neighboring reference samples. The above case may be referred to as linear interpolation intra prediction (LIP). In addition, the chrominance prediction samples may be generated based on the luminance samples using a linear model. This case may be referred to as an LM mode. In addition, the temporary prediction samples of the current block may be derived based on the filtered neighboring reference samples, and the prediction samples of the current block may be derived by a weighted sum of at least one reference sample derived according to the intra prediction mode among the temporary prediction samples and the existing neighboring reference samples (that is, the unfiltered neighboring reference samples). The above situation may be referred to as position-dependent intra prediction (PDPC). In addition, a reference sample line with the highest prediction accuracy is selected from a plurality of adjacent reference sample lines of the current block to derive a prediction sample using a reference sample located in the prediction direction in the corresponding line, and at this time, intra prediction coding may be performed by indicating (signaling) the reference sample line used to the image decoding device 200. The above situation may be referred to as multi-reference line (MRL) intra prediction or MRL-based intra prediction. In addition, by dividing the current block into vertical or horizontal sub-partitions, intra prediction is performed based on the same intra prediction mode, and adjacent reference samples may be derived and used in units of sub-partitions. That is, in this case, the intra prediction mode of the current block is equally applied to the sub-partitions, but in some cases, the intra prediction performance may be improved by deriving and using adjacent reference samples in units of sub-partitions. This prediction method may be referred to as intra sub-partitioning (ISP) or intra prediction based on ISP. The above intra prediction method may be referred to as an intra prediction type. The intra prediction type may be referred to as various terms, such as an intra prediction technique or an additional intra prediction mode. For example, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL, or ISP. A common intra prediction method that excludes specific intra prediction types such as LIP, LM, PDPC, MRL, and ISP may be referred to as a normal intra prediction type. The normal intra prediction type may generally be applied when the above specific intra prediction type is not applied, and prediction may be performed based on the above intra prediction mode. In addition, post-processing filtering may be performed on the derived prediction samples, if necessary.

[0117] Specifically, the intra prediction process may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, if necessary, a post-filtering step may be performed on the derived prediction samples.

[0118] In addition, in addition to the above-mentioned intra prediction types, affine linear weighted intra prediction (ALWIP) can also be used. ALWIP can be referred to as linear weighted intra prediction (LWIP) or matrix weighted intra prediction or matrix-based intra prediction (MIP). If MIP is applied to the current block, i) neighboring reference samples that have been subjected to an averaging process are used, ii) a matrix-vector multiplication process is performed, and iii) a horizontal / vertical interpolation process is further performed to derive the prediction sample of the current block as needed. The intra prediction mode for MIP can be configured to be different from the intra prediction mode used in LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. The intra prediction mode of MIP can be referred to as MIP intra prediction mode, MIP prediction mode, or MIP mode. For example, the matrix and offset used in the matrix-vector multiplication can be set differently according to the intra prediction mode of MIP. Here, the matrix can be referred to as a (MIP) weighting matrix, and the offset can be referred to as a (MIP) offset vector or a (MIP) bias vector.

[0119] Figure 4 is a diagram schematically showing the intra prediction unit 185 of the image encoding device 100, and Figure 5 is a flow chart showing a method of encoding an image based on intra-frame prediction.

[0120] Step S500 may be performed by the intra prediction unit 185 of the image encoding device 100, and step S520 may be performed by the residual processor of the image encoding device 100. Specifically, step S520 may be performed by the subtractor 115 of the image encoding device 100. At step S530, prediction information may be derived by the intra prediction unit 185 and encoded by the entropy encoder 190. At step S530, residual information may be derived by the residual processor and encoded by the entropy encoder 190. Residual information is information about residual samples. The residual information may include information about quantized transform coefficients of the residual samples. As described above, the residual samples may be derived as transform coefficients by the transformer 120 of the image encoding device 100, and the transform coefficients may be derived as quantized transform coefficients by the quantizer 130. Information about the quantized transform coefficients may be encoded by the entropy encoder 190 through a residual encoding process.

[0121] The image encoding device 100 may perform intra prediction on the current block (S510). The image encoding device 100 may derive an intra prediction mode / type of the current block, derive neighboring reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the process for determining the intra prediction mode / type, the process for deriving neighboring reference samples, and the process for generating prediction samples may be performed simultaneously, or any one process may be performed before the other process. For example, the intra prediction unit 185 of the image encoding device 100 may include an intra prediction mode / type determination unit 186, a reference sample derivation unit 187, and a prediction sample derivation unit 188. The intra prediction mode / type determination unit 186 may determine the intra prediction mode / type of the current block, the reference sample derivation unit 187 may derive neighboring reference samples of the current block, and the prediction sample derivation unit 188 may derive the prediction samples of the current block. In addition, although not shown, when performing a prediction sample filtering process, the intra prediction unit 185 may further include a prediction sample filter (not shown). The image encoding apparatus 100 may determine a mode / type applied to a current block among a plurality of intra prediction modes / types. The image encoding apparatus 100 may compare RD costs of intra prediction modes / types and determine an optimal intra prediction mode / type for the current block.

[0122] In addition, the image encoding device 100 may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0123] The image encoding apparatus 100 may generate residual samples of the current block based on the (filtered) prediction samples (S520). The image encoding apparatus 100 may compare the prediction samples with the original samples of the current block based on a phase and derive the residual samples.

[0124] The image encoding apparatus 100 may encode image information including information about intra prediction (prediction information) and residual information of residual samples (S530). The prediction information may include intra prediction mode information and intra prediction type information. The image encoding apparatus 100 may output the encoded image information in the form of a bit stream. The output bit stream may be sent to the image decoding apparatus 200 via a storage medium or a network.

[0125] The residual information may include the following residual encoding syntax. The image encoding apparatus 100 may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.

[0126] In addition, as described above, the image encoding device 100 can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the image encoding device 100 can perform dequantization / inverse transformation on the quantized transform coefficients again to derive (modified) residual samples. The residual samples are transformed / quantized and then dequantized / inverse transformed to derive residual samples that are the same as the residual samples derived in the image decoding device 200 as described above. The image encoding device 100 can generate a reconstructed block including reconstructed samples of the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture of the current picture can be generated based on the reconstructed block. As described above, the in-loop filtering process is further applicable to the reconstructed picture.

[0127] Figure 6 is a diagram schematically showing an intra prediction unit of the image decoding apparatus 200, and Figure 7 is a flow chart showing a method of decoding an image based on intra-frame prediction.

[0128] The image decoding apparatus 200 may perform an operation corresponding to an operation performed by the image encoding apparatus 100 .

[0129] Steps S710 to S720 may be performed by the intra prediction unit 265 of the image decoding device 200, and the prediction information of step S730 and the residual information of step S740 may be obtained from the bitstream by the entropy decoding unit 210 of the image decoding device 200. The residual processor of the image decoding device 200 may derive the residual samples of the current block based on the residual information. Specifically, the dequantizer 220 of the residual processor may perform dequantization based on the quantized transform coefficient derived from the residual information to derive the transform coefficient, and the inverse transformer 230 of the residual processor may perform inverse transform on the transform coefficient to derive the residual samples of the current block. Step S750 may be performed by the adder 235 or the reconstructor of the image decoding device 200.

[0130] Specifically, the image decoding device 200 may derive the intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) (S710). The image decoding device 200 may derive the neighboring reference samples of the current block (S720). The image decoding device 200 may generate the prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples (S730). In this case, the image decoding device 200 may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post filtering. Some or all of the prediction samples in the prediction sample may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0131] The image decoding device 200 generates a residual sample of the current block based on the received residual information. The image decoding device 200 may generate a reconstructed sample of the current block based on the predicted sample and the residual sample, and derive a reconstructed block including the reconstructed sample (S750). A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, the in-loop filtering process is further applicable to the reconstructed picture.

[0132] Here, the intra prediction unit 265 of the image decoding apparatus 200 may include an intra prediction mode / type determination unit 266, which may determine the intra prediction mode / type of the current block based on the intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit 186 of the image encoding apparatus 100, a reference sample derivation unit 267, and a prediction sample derivation unit 268. The reference sample derivation unit 266 may derive the neighboring reference samples of the current block, and the prediction sample derivation unit 267 may derive the prediction sample of the current block. In addition, although not shown, when performing the above-mentioned prediction sample filtering process, the intra prediction unit 265 may further include a prediction sample filter (not shown).

[0133] The intra-frame prediction mode information may include flag information (e.g., intra_luma_mpm_flag) specifying whether the most probable mode (MPM) or the remaining modes are applied to the current block, and when the MPM is applied to the current block, the prediction mode information may also include index information (e.g., intra_luma_mpm_idx) specifying one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra-frame prediction mode information may also include remaining mode information (e.g., intra_luma_mpm_remainder) specifying one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The image decoding device 200 may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information. For the above-mentioned MIP, a separate MPM list may be configured.

[0134] In addition, the intra-frame prediction type information can be implemented in various forms. For example, the intra-frame prediction type information may include intra-frame prediction type index information specifying one of the intra-frame prediction types. As another example, the intra-frame prediction type information may include reference sample line information (e.g., intra_luma_ref_idx) specifying whether MRL is applied to the current block and which reference sample line to use if applied, ISP flag information (e.g., intra_subpartitions_mode_flag) specifying whether ISP is applied to the current block, ISP type information specifying the division type of the sub-partition when ISP is applied (e.g., intra_subpartitions_split_flag), flag information specifying whether PDCP is applied, or flag information specifying whether LIP is applied. In addition, the intra-frame prediction type information may include a MIP flag specifying whether MIP is applied to the current block.

[0135] The intra prediction mode information and / or the intra prediction type information may be encoded / decoded by the encoding method described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction type information may be encoded / decoded by entropy encoding (eg, CABAC or CAVLC) based on a truncated binary code.

[0136] Intra prediction for chroma blocks

[0137] When intra prediction is performed for a current block, prediction for a luminance component block (luminance block) and prediction for a chrominance component block (chrominance block) of the current block may be performed, in which case the intra prediction mode for the chrominance block may be set separately from the intra prediction mode for the luminance block.

[0138] For example, the intra prediction mode for the chroma block may be indicated based on the intra chroma prediction mode information, and the intra chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element. As an example, the intra chroma prediction mode information may indicate one of the candidate modes, the candidate mode including at least one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), an L_CCLM, a T_CCLM, or a LT_CCLM mode. DM may also be referred to as a direct mode. CCLM may be referred to as an LM.

[0139] In addition, DM and CCLM are related intra prediction modes for predicting chrominance blocks using luma block information. DM may indicate a mode in which the same intra prediction mode as that for luma blocks is applied as the intra prediction mode for chrominance blocks. In addition, CCLM may indicate an intra prediction mode in which the reconstructed samples of the luma block are subsampled in the process of generating a prediction block for the chrominance block, and then the samples derived by applying CCLM parameters α and β to the subsampled samples are used as prediction samples for the chrominance blocks.

[0140] MDM (Multi-DM)

[0141] MDM can be applied to the current chrominance block. MDM can be a mode that uses DM (existing single mode) by expanding DM into multiple modes. That is, when configuring the intra-frame prediction mode of the color difference image, it can be selected from Figure 8 The various positions shown select multiple DMs.

[0142] - Intra prediction modes for the CR (center right) position, TL (top left) position, TR (top right) position, BL (bottom left) position, and BR (bottom right) position of the same-positioned luma block

[0143] - Intra prediction modes of the L (left) block, A (top) block, BL (lower left) block, AR (upper right) block, and AL (upper left) block of the neighboring blocks of the current chroma block

[0144] - Planar mode, DC mode

[0145] - Angle mode of -1 or +1 to the previously selected angle mode

[0146] - Vertical mode, Horizontal mode, Intra prediction mode 2, Intra prediction mode 34, Intra prediction mode 66, Intra prediction mode 10, Intra prediction mode 26 (in case of 65 direction mode)

[0147] - If none of the five forecast modes (DM) are selected, the previously selected mode is copied and selected.

[0148] Entropy Coding

[0149] When the input signal is a syntax element rather than a binary value, the CABAC encoding process first converts the input signal into a binary value by binarization. If the input signal is already a binary value, it is bypassed without binarization. Here, each binary 0 or 1 that constitutes a binary value is called a bin. For example, if the binary string (empty string) after binarization is 110, each of 1, 1, and 0 is called a bin. The bin of a syntax element can indicate the value of the corresponding syntax element.

[0150] The binarized bin is input to a conventional coding engine or a bypass coding engine. The conventional coding engine assigns a context model that reflects the probability value of the bin, and encodes the bin based on the assigned context model. The conventional coding engine can perform encoding on each bin and then update the probability model of the corresponding bin. These encoded bins are called context-encoded bins. The bypass coding engine omits the process of estimating the probability of the input bin and the process of updating the probability model applied to the bin after encoding. Instead of assigning context, the input bin is encoded by applying a uniform probability distribution (e.g., 50:50) to speed up the encoding. The encoded bin is called a bypass bin. A context model can be assigned and updated for each bin that is context-encoded (rule-encoded), and the context model can be indicated based on ctxidx or ctxInc. ctxidx can be derived based on ctxInc. Specifically, for example, the context index (ctxidx) indicating the context model of each of the bins of the rule encoding can be derived as the sum of the context index increment (ctxInc) and the context index offset (ctxIdxOffset). Here, ctxInc may be derived differently for each bin. ctxIdxOffset may be represented by the lowest value of ctxIdx. The lowest value of ctxIdx may be referred to as the initial value of ctxIdx. ctxIdxOffset is a value generally used to distinguish from context models of other syntax elements, and the context model of a syntax element may be distinguished / derived based on ctxinc.

[0151] During the entropy coding process, it can be determined whether to encode by a regular encoding engine or by a bypass encoding engine, and the encoding path is switched. Entropy decoding is performed in reverse order through the same process as entropy coding.

[0152] Fig. 9 is a diagram schematically showing an entropy encoder 190 of the image encoding device 100, and Fig.10 is a flow chart illustrating an entropy encoding method.

[0153] refer to Fig. 9 and Fig.10 , the image encoding device 100 may perform an entropy encoding process on the image / video information. The image / video information may include partition related information, prediction related information (e.g., inter / intra prediction classification information, intra prediction mode information, inter prediction mode information, etc.), residual information, in-loop filtering related information, etc., or various syntax elements related thereto. Entropy encoding may be performed in units of syntax elements. S1010 to S1020 may be performed by Figure 1 The entropy encoder 190 performs.

[0154] The image encoding apparatus 100 may binarize the target syntax element (S1010). The binarization may be based on various binarization methods, such as a truncated rice binarization process and a fixed length binarization process, and the binarization method of the target syntax element may be predefined. The binarization process may be performed by the binarization unit 192 in the entropy encoder 190.

[0155] The image encoding device 100 may entropy encode the target syntax element (S1020). The image encoding device 100 may encode the empty string of the target syntax element based on conventional coding (context-based) or bypass coding based on an entropy coding technique such as context adaptive arithmetic coding (CABAC) or context adaptive variable length coding (CAVLC), and its output may be included in the bitstream. The entropy encoding process may be performed by the entropy encoding processor 193 in the entropy encoder 190. As described above, the bitstream may be sent to the image decoding device 200 via a (digital) storage medium or a network.

[0156] Fig.11 is a diagram schematically showing an entropy decoder 210 of the image decoding apparatus 200, and Fig.12 is a flow chart illustrating an entropy decoding method.

[0157] refer to Fig.11 and Fig.12 , the image decoding device 200 can decode the encoded image / video information. The image / video information may include partition related information, prediction related information (e.g., inter / intra prediction classification information, intra prediction mode information, inter prediction mode information, etc.), residual information, in-loop filtering related information, etc., or include various syntax elements related thereto. Entropy decoding may be performed in units of syntax elements. S1210 to S1220 may be performed by Figure 2 The entropy decoder 210 performs.

[0158] The image decoding device 200 may binarize the target syntax element (S1210). Here, the binarization may be based on various binarization methods, such as a truncated Rice binarization process and a fixed-length binarization process, and the binarization method of the target syntax element may be predefined. The image decoding device 200 may derive an available empty string (empty string candidate) of an available value of the target syntax element through the binarization process. The binarization process may be performed by the binarization unit 212 in the entropy decoder 210.

[0159] The image decoding device 200 performs entropy decoding on the target syntax element (S1220). The image decoding device 200 compares the derived bin string with the available bin string for the syntax element while sequentially decoding and parsing each bin of the target syntax element from the input bits in the bitstream. If the derived empty string is the same as one of the available empty strings, the value corresponding to the empty string is derived as the value of the syntax element. If not, the above process is performed again after further parsing the next bit in the bitstream. Through this process, variable length bits can be used to signal corresponding information without using the start bit or end bit of specific information (specific syntax element) in the bitstream. As a result, smaller bits can be allocated to lower values ​​and the overall coding efficiency can be improved.

[0160] The image decoding device 200 can decode each bin in the bin string from the bitstream based on context or based on bypass based on entropy coding techniques (such as CABAC or CAVLC). The bitstream may include various information for image / video decoding as described above. As described above, the bitstream can be sent to the image decoding device 200 via a (digital) storage medium or a network.

[0161] Implementation

[0162] Embodiments of the present disclosure relate to intra prediction, and in particular to intra prediction of chroma blocks and chroma multi-intra DM. In the following description, 'chroma intra prediction mode' may be an intra prediction mode for intra prediction of a (current) chroma block.

[0163] Fig.13 An example of a method for determining a chroma intra prediction mode according to an embodiment of the present disclosure is shown in FIG. Fig.13 , it can be determined whether the chroma intra prediction mode is the CCLM mode (S1310), and if the chroma intra prediction mode is the CCLM mode, one of the LM mode, LM_A mode, or LM_L mode can be determined as the chroma intra prediction mode (S1320). If it is not the CCLM mode, it can be determined whether it is the DM mode (S1330). When the chroma intra prediction mode is the DM mode, the coverage Figure 8 The intra prediction mode of the luma block at the CR position of the co-located luma image may be determined as the chroma intra prediction mode (S1340). If the chroma intra prediction mode is not the DM mode, any one of four default modes may be selected as the chroma intra prediction mode (S1350).

[0164] Furthermore, as described above, MDM that expands a single mode (ie, DM mode) into multiple modes may be applied, and in this case, it is possible to Figure 8 The various positions shown select multiple DMs.

[0165] However, since the MDM method adaptively selects all chroma intra prediction mode candidates (MDM), basic modes (base mode or default mode) of chroma intra prediction modes such as planar mode, DC mode, horizontal mode, and vertical mode may be excluded from the chroma intra prediction mode candidates.

[0166] The present disclosure proposes a method of configuring MDM while always maintaining a default mode when configuring a chroma intra prediction mode. Fig.14 is a flowchart showing an image encoding method according to an embodiment of the present disclosure, and Fig.15 is a flowchart showing an image decoding method according to an embodiment of the present disclosure.

[0167] refer to Fig.14 , the image encoding apparatus 100 may derive a plurality of DM candidates for the chrominance block (S1410). The image encoding apparatus 100 may determine one DM candidate among the derived DM candidates (S1420). Depending on the embodiment, the image encoding apparatus 100 may determine one mode among the derived DM candidates and the default mode for the chrominance block (S1420).

[0168] In addition, the image encoding apparatus 100 may perform intra prediction on the chroma block based on the determined DM candidate (or the determined mode) (S1430). Information (first information) about the determined DM candidate (or the determined mode) may be encoded in the bitstream. Information (that is, first information) about the determined DM candidate (or the determined mode) may be intra chroma prediction mode information (intra_chroma_pred_mode).

[0169] refer to Fig.15 , the image decoding apparatus 200 may derive a plurality of DM candidates for the chrominance block ( S1510 ). The image decoding apparatus 200 may derive a plurality of DM candidates in the same manner as the image encoding apparatus 100 .

[0170] The image decoding device 200 may determine one of the plurality of DM candidates based on the first information (S1520). Depending on the implementation, the image decoding device 200 may determine one of the default mode and the derived DM candidates for the chrominance block based on the first information (S1520). The first information may be obtained from the bitstream. The image decoding device 200 may perform intra-frame prediction on the chrominance block based on the determined DM candidate (or the determined mode) (S1530).

[0171] Hereinafter, embodiments of the present disclosure will be described in more detail.

[0172] Implementation Method 1

[0173] Embodiment 1 proposes 1) a method of more accurately deriving three DM candidates, 2) a method of binarizing information about a plurality of derived DM candidates, and 3) a method of modifying a default mode based on a plurality of derived DM candidates.

[0174] Fig.16 An example of a method of determining a chroma intra prediction mode according to Embodiment 1 is shown. Fig.16 , it can be determined whether the chroma intra prediction mode is the CCLM mode (S1610), and if the chroma intra prediction mode is the CCLM mode, one of the LM mode, LM_A mode, or LM_L mode can be determined as the chroma intra prediction mode (S1620). If it is not the CCLM mode, it can be determined whether it is the DM mode (S1630). When the chroma intra prediction mode is the DM mode, any one of the three DM candidates can be determined as the chroma intra prediction mode (S1640). If the chroma intra prediction mode is not the DM mode, any one of the four default modes can be selected as the chroma intra prediction mode (S1650).

[0175] Implementation Method 1-1

[0176] Embodiment 1-1 is a method for accurately deriving DM candidates.

[0177] Fig.17 is a flowchart showing a method of deriving three DM candidates.

[0178] refer to Fig.17 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive a plurality of DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1710 ).

[0179] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions within the luminance block, and derive DM candidates from the intra prediction modes of the different search positions on a first-come-first-served basis according to the search order. The DM candidates derived from the different positions within the luminance block may be referred to as "first DM candidates".

[0180] The different positions within the luminance block and their search order may be as follows.

[0181] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0182] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0183] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0184] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0185] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0186] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (3) (S1720).

[0187] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (3), the image encoding apparatus 100 and the image decoding apparatus 200 may derive a DM candidate from a default mode (S1730). That is, when the number of DM candidates derived using intra prediction modes at different positions within the same luminance block is less than a predetermined number, deriving a DM candidate using the default mode may be performed. The DM candidate derived from the default mode may be referred to as a "fourth DM candidate".

[0188] The number of default patterns for deriving DM candidates may be the same as the predetermined number (3). The default patterns for deriving DM candidates and their search order may be as follows.

[0189] 6. Planar Intra Prediction Mode

[0190] 7. Vertical intra prediction mode

[0191] 8. Horizontal intra prediction mode

[0192] The above-mentioned search orders 1 to 8 represent examples for deriving DM candidates. The search orders 1 to 5 may be changed, and the default modes 6 to 8 may also be replaced with other modes.

[0193] Fig.18 is a flow chart showing another method of deriving three DM candidates.

[0194] refer to Fig.18 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive a plurality of DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1810 ).

[0195] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in a luminance block, and derive DM candidates from intra prediction modes of the different search positions on a first-come-first-served basis according to the search order.

[0196] The different positions within the luminance block and their search order may be as follows.

[0197] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0198] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0199] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0200] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0201] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0202] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (3) (S1820).

[0203] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (3), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the chroma block ( S1830 ).

[0204] For example, the image encoding apparatus 100 and the image decoding apparatus 200 may sequentially search for neighboring blocks of a chroma block, and derive DM candidates from intra prediction modes of the searched neighboring blocks on a first-come-first-served basis according to the search order. The neighboring blocks of the chroma block and the search order thereof may be as follows. The DM candidates derived from the neighboring blocks of the chroma block may be referred to as "second DM candidates".

[0205] The neighboring blocks of the chroma block and their search order can be as follows.

[0206] 6. Intra-frame prediction mode of L block as neighboring block of chroma block

[0207] 7. Intra-frame prediction mode of block A as a neighboring block of the chroma block

[0208] 8. Intra-frame prediction mode of BL block as neighboring block of chroma block

[0209] 9. Intra-frame prediction mode of AR block as neighboring block of chroma block

[0210] 10. Intra-frame prediction mode of AL block as neighboring block of chroma block

[0211] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived through steps S1810 and S1830 is less than a predetermined number (3) ( S1840 ).

[0212] If the number of DM candidates derived from intra prediction modes 1 to 10 is less than a predetermined number (3), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from a default mode (S1830). That is, when the number of DM candidates derived using different positions in the co-located luminance block and the neighboring block of the chrominance block is less than a predetermined number (3), deriving the DM candidates using the default mode may be performed.

[0213] The number of default modes for deriving DM candidates may be equal to a predetermined number (3). The default modes for deriving DM candidates and their search order may be as follows.

[0214] 11. Planar Intra Prediction Mode

[0215] 12. Vertical intra prediction mode

[0216] 13. Horizontal intra prediction mode

[0217] The above-mentioned search orders 1 to 13 represent examples for deriving DM candidates. The search orders 1 to 10 may be changed, and the default modes 11 to 13 may also be replaced with other modes.

[0218] Implementation 1-2

[0219] Embodiment 1-2 is a method of binarizing information about a plurality of derived DM candidates.

[0220] The image encoding apparatus 100 encodes information about the three derived DM candidates through binarization, and may model and signal the information about the encoded DM candidates through context modeling. An example of context modeling of DM candidates is shown in Table 1.

[0221] [Table 1]

[0222]

[0223] As shown in Table 1, the first selected (derived) DM candidate may be encoded and decoded into 1 bit and signaled through context modeling, and the second selected (derived) DM candidate and the third selected (derived) DM candidate may be encoded and decoded into 2 bits and then signaled through context modeling. Depending on the embodiment, in order to reduce the data throughput in the image decoding device 200, 1-bit or 2-bit encoding and decoding of the DM candidate may be performed by a bypass model excluding context modeling.

[0224] Implementation 1-3

[0225] Embodiments 1-3 may correspond to a method of modifying a default mode based on a plurality of derived DM candidates. That is, embodiments 1-3 may correspond to a trimming inspection method to remove overlaps between derived DM candidates and the default mode.

[0226] The image encoding apparatus 100 and the image decoding apparatus 200 may modify the default mode based on whether the default mode overlaps with the derived DM mode. That is, the default mode may be modified to a different prediction mode based on the default mode being determined to be in the same order as the DM candidate.

[0227] For example, among the default modes (planar mode, vertical mode, horizontal mode and DC mode), the default mode that first overlaps with the DM candidate can be modified to the vertical diagonal mode (intra-frame prediction mode 66), the default mode that secondly overlaps with the DM candidate can be modified to the diagonal mode (intra-frame prediction mode 34), and the default mode that thirdly overlaps with the DM candidate can be modified to the intra-frame prediction mode 2.

[0228] As another example, when the plane mode, intra prediction mode 27, and DC mode are derived as DM candidates, the default mode may be modified to the vertical diagonal mode, the vertical mode, the horizontal mode, and the diagonal mode. As another example, when the intra prediction mode 36, the intra prediction mode 27, and the vertical mode are derived as DM candidates, the default mode may be modified to the plane mode, the vertical diagonal mode, the horizontal mode, and the DC mode. The combination of the vertical diagonal mode, the diagonal mode, and the intra prediction mode 2 (which is the overlap replacement mode in the above example) may be replaced with a combination of other modes.

[0229] Implementation Method 2

[0230] Embodiment 2 proposes 1) a method of deriving two DM candidates more accurately, 2) a method of binarizing information about a plurality of derived DM candidates, and 3) a method of modifying a default mode based on a plurality of derived DM candidates.

[0231] Fig.19 An example of a method of determining a chroma intra prediction mode according to Embodiment 2 is shown. Fig.19, it can be determined whether the chroma intra prediction mode is the CCLM mode (S1910), and if the chroma intra prediction mode is the CCLM mode, one of the LM mode, LM_A mode, or LM_L mode can be determined as the chroma intra prediction mode (S1920). If it is not the CCLM mode, it can be determined whether it is the DM mode (S1930). When the chroma intra prediction mode is the DM mode, any one of the two DM candidates can be determined as the chroma intra prediction mode (S1940). If the chroma intra prediction mode is not the DM mode, any one of the four default modes can be selected as the chroma intra prediction mode (S1950).

[0232] Implementation Method 2-1

[0233] Embodiment 2-1 is a method for accurately deriving DM candidates.

[0234] Fig.17 is a flow chart illustrating a method of deriving two DM candidates.

[0235] refer to Fig.17 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive two DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1710 ).

[0236] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions within a luminance block, and derive DM candidates from intra prediction modes of the different search positions on a first-come-first-served basis according to the search order.

[0237] The different positions within the luminance block and their search order may be as follows.

[0238] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0239] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0240] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0241] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0242] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0243] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (2) (S1720).

[0244] If the number of DM candidates derived from the intra prediction modes 1 to 5 is less than the predetermined number (2), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from the default mode (S1730). That is, when the number of DM candidates derived using the intra prediction modes at different positions within the co-located luminance block is less than the predetermined number (2), deriving the DM candidates using the default mode may be performed.

[0245] The number of default modes for deriving DM candidates may be the same as the predetermined number (2). The default modes for deriving DM candidates and their search order may be as follows.

[0246] 6. Planar Intra Prediction Mode

[0247] 7. Vertical intra prediction mode

[0248] The above-mentioned search orders 1 to 7 represent examples for deriving DM candidates. The search orders 1 to 5 may be changed, and the default modes 6 to 7 may also be replaced with other modes.

[0249] Fig.18 is a flow chart illustrating another method of deriving two DM candidates.

[0250] refer to Fig.18 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive two DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1810 ).

[0251] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in a luminance block, and derive DM candidates from intra prediction modes of the different search positions on a first-come-first-served basis according to the search order.

[0252] The different positions within the luminance block and their search order may be as follows.

[0253] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0254] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0255] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0256] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0257] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0258] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (2) (S1820).

[0259] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (2), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the chrominance block (S1830). For example, the image encoding apparatus 100 and the image decoding apparatus 200 may sequentially search the neighboring blocks of the chrominance block and derive DM candidates from the intra prediction modes of the searched neighboring blocks on a first-come, first-served basis according to the search order. The neighboring blocks of the chrominance block and their search order may be as follows.

[0260] 6. Intra-frame prediction mode of L block as neighboring block of chroma block

[0261] 7. Intra-frame prediction mode of block A as a neighboring block of the chroma block

[0262] 8. Intra-frame prediction mode of BL block as neighboring block of chroma block

[0263] 9. Intra-frame prediction mode of AR block as neighboring block of chroma block

[0264] 10. Intra-frame prediction mode of AL block as neighboring block of chroma block

[0265] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived through steps S1810 and S1830 is less than a predetermined number (2) (S1840).

[0266] If the number of DM candidates derived from the intra prediction modes 1 to 10 is less than the predetermined number (2), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from the default mode (S1830). That is, when the number of DM candidates derived using different positions in the co-located luminance block and the neighboring block of the chrominance block is less than the predetermined number (2), deriving the DM candidates using the default mode may be performed.

[0267] The number of default modes for deriving DM candidates may be the same as the predetermined number (2). The default modes for deriving DM candidates and their search order may be as follows.

[0268] 11. Planar Intra Prediction Mode

[0269] 12. Vertical intra prediction mode

[0270] The above-mentioned search orders 1 to 12 represent examples for deriving DM candidates. The search orders 1 to 10 may be changed, and the default modes 11 to 12 may also be replaced with other modes.

[0271] Implementation Method 2-2

[0272] Embodiment 2-2 is a method of binarizing information about a plurality of derived DM candidates.

[0273] The image encoding apparatus 100 encodes information about two derived DM candidates through binarization, and may model and signal information about the encoded DM candidates through context modeling. An example of context modeling of DM candidates is shown in Table 2.

[0274] [Table 2]

[0275]

[0276] As shown in Table 2, two DM candidates may be encoded and decoded into 1 bit and signaled through context modeling. Depending on the embodiment, in order to reduce data throughput in the image decoding apparatus 200, 1-bit or 2-bit encoding and decoding of DM candidates may be performed through a bypass model excluding context modeling.

[0277] Implementation 2-3

[0278] Embodiment 2-3 may correspond to a method of modifying a default mode based on a plurality of derived DM candidates. That is, embodiment 2-3 may correspond to a trimming inspection method to remove overlaps between derived DM candidates and the default mode.

[0279] The image encoding apparatus 100 and the image decoding apparatus 200 may modify the default mode based on whether the default mode overlaps with the derived DM mode. That is, the default mode may be modified to a different prediction mode based on the default mode being determined to be in the same order as the DM candidate.

[0280] For example, among the default modes (planar mode, vertical mode, horizontal mode and DC mode), the default mode that first overlaps with the DM candidate can be modified to the vertical diagonal mode (intra-frame prediction mode 66), and the default mode that secondly overlaps with the DM candidate can be modified to the diagonal mode (intra-frame prediction mode 34).

[0281] As another example, when the planar mode and the DC mode are derived as DM candidates, the default mode can be modified to the vertical diagonal mode, the vertical mode, the horizontal mode, and the diagonal mode. As another example, when the intra prediction mode 27 and the vertical mode are derived as DM candidates, the default mode can be modified to the planar mode, the vertical diagonal mode, the horizontal mode, and the DC mode. The combination of the vertical diagonal mode and the diagonal mode (which is the overlap replacement mode in the above example) can be replaced with a combination of other modes.

[0282] Implementation 3

[0283] Embodiment 3 proposes 1) a method of more accurately deriving four DM candidates, 2) a method of binarizing information about a plurality of derived DM candidates, and 3) a method of modifying a default mode based on a plurality of derived DM candidates.

[0284] Fig. 20 An example of a method of determining a chroma intra prediction mode according to Embodiment 3 is shown. Fig. 20 , it can be determined whether the chroma intra prediction mode is the CCLM mode (S2010), and if the chroma intra prediction mode is the CCLM mode, one of the LM mode, LM_A mode, or LM_L mode can be determined as the chroma intra prediction mode (S2020). If it is not the CCLM mode, it can be determined whether it is the DM mode (S2030). When the chroma intra prediction mode is the DM mode, any one of the four DM candidates can be determined as the chroma intra prediction mode (S2040). If the chroma intra prediction mode is not the DM mode, any one of the four default modes can be selected as the chroma intra prediction mode (S2050).

[0285] Implementation Method 3-1

[0286] Implementation 3-1 is a method for accurately deriving DM candidates. Fig.17 is a flowchart illustrating a method of deriving four DM candidates.

[0287] refer to Fig.17 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive four DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1710 ).

[0288] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions within a luminance block, and derive DM candidates from intra prediction modes of the different search positions on a first-come-first-served basis according to the search order.

[0289] The different positions within the luminance block and their search order may be as follows.

[0290] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0291] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0292] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0293] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0294] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0295] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (4) (S1720).

[0296] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (4), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from a default mode (S1730). That is, when the number of DM candidates derived using intra prediction modes at different positions within the co-located luminance block is less than a predetermined number, deriving DM candidates using the default mode may be performed.

[0297] The number of default modes for deriving DM candidates may be the same as the predetermined number (4). The default modes for deriving DM candidates and their search order may be as follows.

[0298] 6. Planar Intra Prediction Mode

[0299] 7. Vertical intra prediction mode

[0300] 8. Horizontal intra prediction mode

[0301] 9. DC intra prediction mode

[0302] The above-mentioned search orders 1 to 9 represent examples for deriving DM candidates. The search orders 1 to 5 may be changed, and the default modes 6 to 9 may also be replaced with other modes.

[0303] Fig.18 is a flowchart illustrating another method of deriving four DM candidates.

[0304] refer to Fig.18 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive four DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1810 ).

[0305] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in a luminance block, and derive DM candidates from intra prediction modes of the different search positions on a first-come-first-served basis according to the search order.

[0306] The different positions within the luminance block and their search order may be as follows.

[0307] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0308] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0309] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0310] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0311] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0312] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (4) (S1820).

[0313] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (4), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the chroma block ( S1830 ).

[0314] For example, the image encoding apparatus 100 and the image decoding apparatus 200 may sequentially search the neighboring blocks of the chrominance block and derive DM candidates from the intra prediction modes of the searched neighboring blocks on a first-come-first-served basis according to the search order. The neighboring blocks of the chrominance block and their search order may be as follows.

[0315] 6. Intra-frame prediction mode of L block as neighboring block of chroma block

[0316] 7. Intra-frame prediction mode of block A as a neighboring block of the chroma block

[0317] 8. Intra-frame prediction mode of BL block as neighboring block of chroma block

[0318] 9. Intra-frame prediction mode of AR block as neighboring block of chroma block

[0319] 10. Intra-frame prediction mode of AL block as neighboring block of chroma block

[0320] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived through steps S1810 and S1830 is less than a predetermined number (4) (S1840).

[0321] If the number of DM candidates derived from the intra prediction modes 1 to 10 is less than the predetermined number (4), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from the default mode (S1830). That is, when the number of DM candidates derived using different positions in the co-located luminance block and the neighboring block of the chrominance block is less than the predetermined number (4), deriving the DM candidates using the default mode may be performed.

[0322] The number of default modes for deriving DM candidates may be the same as the predetermined number (4). The default modes for deriving DM candidates and their search order may be as follows.

[0323] 11. Planar Intra Prediction Mode

[0324] 12. Vertical intra prediction mode

[0325] 13. Horizontal intra prediction mode

[0326] 14. DC intra prediction mode

[0327] The above-mentioned search orders 1 to 14 represent examples for deriving DM candidates. The search orders 1 to 10 may be changed, and the default modes 11 to 14 may also be replaced with other modes.

[0328] Implementation 3-2

[0329] Embodiment 3-2 is a method of binarizing information about a plurality of derived DM candidates.

[0330] The image encoding apparatus 100 encodes information about four derived DM candidates through binarization, and may model and signal information about the encoded DM candidates through context modeling. An example of context modeling of DM candidates is shown in Table 3.

[0331] [Table 3]

[0332]

[0333] As shown in Table 3, four DM candidates may be encoded and decoded into 2 bits and signaled through context modeling. Depending on the embodiment, in order to reduce data throughput in the image decoding apparatus 200, encoding and decoding of DM candidates may be performed through a bypass model excluding context modeling.

[0334] Table 4 shows another example of binarization of DM candidates.

[0335] [Table 4]

[0336]

[0337] As shown in Table 4, the first selected (derived) DM candidate can be encoded and decoded into 1 bit and signaled through context modeling, and the second selected DM candidate can be encoded and decoded into 2 bits and signaled through context modeling. The third selected DM candidate and the fourth selected DM candidate can be encoded and decoded into 3 bits and signaled through context modeling. Depending on the embodiment, in order to reduce the data throughput in the image decoding device 200, 1-bit or 3-bit encoding and decoding of the DM candidate can be performed by a bypass model that excludes context modeling.

[0338] Implementation 3-3

[0339] Embodiment 3-3 may correspond to a method of modifying a default mode based on a plurality of derived DM candidates. That is, embodiment 3-3 may correspond to a trimming inspection method to remove overlap between derived DM candidates and the default mode.

[0340] The image encoding apparatus 100 and the image decoding apparatus 200 may modify the default mode based on whether the default mode overlaps with the derived DM mode. That is, the default mode may be modified to a different prediction mode based on the default mode being determined to be in the same order as the DM candidate.

[0341] For example, among the default modes (planar mode, vertical mode, horizontal mode, and DC mode), the default mode that first overlaps with the DM candidate may be modified to the vertical diagonal mode (intra-prediction mode 66), the default mode that secondly overlaps with the DM candidate may be modified to the diagonal mode (intra-prediction mode 34), and the default mode that thirdly overlaps with the DM candidate may be modified to the intra-prediction mode 2. In addition, the default mode that fourthly overlaps with the DM candidate may be modified to the intra-prediction mode 42.

[0342] As another example, when the plane mode, intra-frame prediction mode 27, DC mode, and intra-frame prediction mode 30 are derived as DM candidates, the default mode can be modified to the vertical diagonal mode, the vertical mode, the horizontal mode, and the diagonal mode. As another example, when the intra-frame prediction mode 34, the intra-frame prediction mode 36, the intra-frame prediction mode 27, and the vertical mode are derived as DM candidates, the default mode can be modified to the plane mode, the vertical diagonal mode, the horizontal mode, and the DC mode. The combination of the vertical diagonal mode, the diagonal mode, the intra-frame prediction mode 2, and the intra-frame prediction mode 42 (which is the overlap replacement mode in the above example) can be replaced with a combination of other modes.

[0343] Example 4

[0344] Embodiment 4 proposes 1) a method of more accurately deriving five DM candidates, 2) a method of binarizing information about a plurality of derived DM candidates, and 3) a method of modifying a default mode based on a plurality of derived DM candidates.

[0345] Fig.21 An example of a method of determining a chroma intra prediction mode according to Embodiment 4 is shown. Fig.21 , it can be determined whether the chroma intra prediction mode is the CCLM mode (S2110), and if the chroma intra prediction mode is the CCLM mode, one of the LM mode, LM_A mode, or LM_L mode can be determined as the chroma intra prediction mode (S2120). If it is not the CCLM mode, it can be determined whether it is the DM mode (S2130). When the chroma intra prediction mode is the DM mode, any one of the five DM candidates can be determined as the chroma intra prediction mode (S2140). If the chroma intra prediction mode is not the DM mode, any one of the four or five default modes can be selected as the chroma intra prediction mode (S2150).

[0346] Example 4-1

[0347] Example 4-1 is a method for accurately deriving DM candidates. Fig.17 is a flowchart showing a method of deriving five DM candidates.

[0348] refer to Fig.17 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1710 ).

[0349] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in the luminance block and derive DM candidates from the intra prediction modes at the different search positions on a first-come-first-served basis in the search order.

[0350] The different positions within the luminance block and their search order may be as follows.

[0351] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0352] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0353] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0354] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0355] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0356] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (5) (S1720).

[0357] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (5), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from a default mode (S1730). That is, when the number of DM candidates derived using intra prediction modes at different positions in the co-located luminance block is less than a predetermined number, deriving DM candidates using the default mode may be performed.

[0358] The number of default patterns for deriving DM candidates may be the same as the predetermined number (5). The default patterns for deriving DM candidates and their search order may be as follows.

[0359] 6. PLANAR intra prediction mode

[0360] 7. Vertical intra prediction mode

[0361] 8. Horizontal intra prediction mode

[0362] 9. DC intra prediction mode

[0363] 10. Vertical diagonal (VDIA) intra prediction mode

[0364] The VDIA intra prediction mode is an upper right diagonal intra prediction mode and may correspond to the intra prediction mode of 66 .

[0365] The above-mentioned search orders 1 to 10 may represent examples for deriving DM candidates. Therefore, the search orders 1 to 5 may be changed, and the default modes 6 to 10 may also be replaced with other modes.

[0366] Fig.18is a flowchart illustrating another method of deriving five DM candidates.

[0367] refer to Fig.18 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S1810 ).

[0368] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in the luminance block and derive DM candidates from intra prediction modes at the different search positions on a first-come-first-served basis in the search order.

[0369] The different positions within the luminance block and their search order may be as follows.

[0370] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0371] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0372] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0373] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0374] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0375] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (5) (S1820).

[0376] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number (5), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the chroma block ( S1830 ).

[0377] For example, the image encoding apparatus 100 and the image decoding apparatus 200 may sequentially search for neighboring blocks of a chrominance block and derive DM candidates from intra prediction modes of the searched neighboring blocks on a first-come-first-served basis according to the search order. The neighboring blocks of the chrominance block and the search order thereof may be as follows.

[0378] 6. Intra-frame prediction mode of L block, L block is the neighboring block of chroma block

[0379] 7. Intra-frame prediction mode of block A, which is a neighboring block of the chrominance block

[0380] 8. Intra-frame prediction mode of BL block, BL block is the neighboring block of chroma block

[0381] 9. Intra-frame prediction mode of AR block, AR block is the neighboring block of chroma block

[0382] 10. Intra-frame prediction mode of AL block, AL block is the neighboring block of chroma block

[0383] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived through steps S1810 and S1830 is less than a predetermined number (5) (S1840). That is, the image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the sum of the number of DM candidates derived from different positions in the luminance block and the number of DM candidates derived from neighboring blocks of the chrominance block is less than a predetermined number (5).

[0384] If the number of DM candidates derived from intra prediction modes 1 to 10 is less than a predetermined number (5), the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from a default mode (S1850). That is, when the number of DM candidates derived using different positions in neighboring blocks of the co-located luminance block and chrominance block is less than a predetermined number (5), deriving DM candidates using the default mode may be performed.

[0385] The number of default patterns for deriving DM candidates may be the same as the predetermined number (5). The default patterns for deriving DM candidates and their search order may be as follows.

[0386] 11. Planar Intra Prediction Mode

[0387] 12. Vertical intra prediction mode

[0388] 13. Horizontal intra prediction mode

[0389] 14. DC intra prediction mode

[0390] 15. Vertical diagonal (VDIA) intra prediction mode

[0391] The above-mentioned search orders 1 to 15 may represent examples for deriving DM candidates. The search orders 1 to 10 may be changed, and the default modes 11 to 15 may also be replaced with other modes.

[0392] Example 4-2

[0393] Embodiment 4-2 is a method of binarizing information about a plurality of derived DM candidates.

[0394] The image encoding apparatus 100 encodes information about five derived DM candidates through binarization, and may model and signal information about the encoded DM candidates through context modeling. Table 5 shows a context modeling example of DM candidates.

[0395] [Table 5]

[0396]

[0397] As illustrated in Table 5, five DM candidates may be encoded and decoded into 1 bit or 2 bits and signaled through context modeling. Depending on the embodiment, in order to reduce data throughput in the image decoding apparatus 200, encoding and decoding of DM candidates may be performed through a bypass model excluding context modeling.

[0398] Table 6 shows another example of binarization of DM candidates.

[0399] [Table 6]

[0400]

[0401] As illustrated in Table 6, the first selected (derived) DM candidate may be encoded and decoded as 1 bit and signaled by context modeling, and the second selected DM candidate may be encoded and decoded as 2 bits and signaled by context modeling. The third selected DM candidate may be encoded and decoded as 3 bits and signaled by context modeling. The fourth and fifth selected DM candidates may be encoded and decoded as 4 bits and signaled by context modeling. Depending on the embodiment, in order to reduce the data throughput in the image decoding device 200, 1-bit or 4-bit encoding and decoding of the DM candidate may be performed by a bypass model that does not include context modeling.

[0402] Example 4-3

[0403] Embodiment 4-3 may correspond to a method of modifying a default mode based on a plurality of derived DM candidates. That is, embodiment 4-3 may correspond to a pruning check method for eliminating overlap between derived DM candidates and a default mode.

[0404] The image encoding apparatus 100 and the image decoding apparatus 200 may modify the default mode based on whether the default mode overlaps with the derived DM mode. That is, the default mode may be modified to a different prediction mode based on the order in which the default mode is determined to be the same as the DM candidate.

[0405] For example, among the default modes (planar mode, vertical mode, horizontal mode, and DC mode), the default mode that overlaps with the DM candidate first may be modified to the vertical diagonal mode (intra-prediction mode of 66), the default mode that overlaps with the DM candidate second may be modified to the intra-prediction mode of 2, and the default mode that overlaps with the DM candidate third may be modified to the diagonal mode (intra-prediction mode of 34). In addition, the default mode that overlaps with the DM candidate fourth may be modified to the intra-prediction mode of 58, and the default mode that overlaps with the DM candidate fifth may be modified to the intra-prediction mode of 10.

[0406] The combination of the vertical diagonal line mode, the intra-frame prediction mode of 2, the diagonal line mode, the intra-frame prediction mode of 58, and the intra-frame prediction mode of 10, which are the overlap replacement modes in the above-mentioned examples, may be replaced with a combination of other modes.

[0407] Example 5

[0408] Embodiment 5 proposes a method for deriving DM candidates more accurately. Specifically, Embodiment 5 proposes a more complex method for deriving the first DM candidate from different positions in the luminance block.

[0409] Fig. 22 A diagram for explaining the method of Embodiment 5 is shown, and different positions in a luminance block proposed in Embodiment 5 and their search order may be as follows.

[0410] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0411] 2. Searching for the luminance block at the TL position of the same luminance block to the luminance block at the BR position in a raster scan order in units of luminance blocks having a predetermined size

[0412] The first DM candidate is derived from the intra prediction mode of the CR position, and subsequent DM candidates can be derived by searching from the TL position to the BR position in raster scan order, as Fig. 22 Here, the unit of search, ie, the predetermined size, may be a 4x4 luma block. If the number of first DM candidates derived through this process is less than a predetermined number (2, 3, 4, or 5), the remaining DM candidates may be derived from the default intra prediction mode.

[0413] The derived DM candidates may be encoded and decoded and signaled by the method proposed in Embodiments 1 to 4 depending on the number thereof. In addition, the derived DM candidates may be encoded by performing binarization by the method proposed in Embodiments 1 to 4 depending on the number thereof, and the encoded DM candidates may be signaled by context modeling. In addition, the derived DM candidates may have their overlap with the default intra prediction mode eliminated by the overlap elimination method proposed in Embodiments 1 to 4.

[0414] Example 6

[0415] Embodiment 6 proposes a method for determining whether to apply the MDM proposed in the present disclosure according to the tree type of the chrominance block. Here, the MDM may correspond to any one of Embodiments 1 to 5.

[0416] When the block structures of the luminance block and the chrominance block are different, MDM can be effectively applied. That is, when performing intra prediction of an I slice, MDM can be more effectively applied if the tree type is dual rather than single. Taking this into account, Example 6 proposes a method for adaptively applying MDM according to the tree type of the chrominance block.

[0417] Fig.23 It is a flowchart showing the image encoding method and the image decoding method according to the sixth embodiment.

[0418] refer to Fig.23 , the image encoding apparatus 100 and the image decoding apparatus 200 may determine a tree type of a chroma block (S2310). The tree type of the chroma block may be a single tree or a dual tree.

[0419] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether to apply MDM or the type of MDM to be applied based on the tree type of the chroma block ( S2320 , S2330 ).

[0420] For example, MDM (S2320) may be applied only when the tree type of the chroma block is a dual tree, and when the tree type of the chroma block is not a dual tree, a single DM (S2330) may be applied. As another example, when the tree type of the chroma block is a dual tree, 5DM (S2320) may be applied, and when the tree type of the chroma block is not a dual tree, 2DM or 3DM (S2330) may be applied. As another example, when the tree type of the chroma block is a dual tree, 3DM (S2320) may be applied, and when the tree type of the chroma block is not a dual tree, 2DM (S2330) may be applied.

[0421] The derived DM candidates may be encoded and decoded and signaled by the method proposed in Embodiments 1 to 5 depending on the number thereof. In addition, the derived DM candidates may be encoded by performing binarization by the method proposed in Embodiments 1 to 5 depending on the number thereof, and the encoded DM candidates may be signaled by context modeling. In addition, the derived DM candidates may have their overlap with the default intra prediction mode eliminated by the overlap elimination method proposed in Embodiments 1 to 5.

[0422] Example 7

[0423] Embodiment 7 is a method for accurately deriving DM candidates. Specifically, embodiment 7 is a method for additionally deriving DM candidates from neighboring blocks of a co-located luminance block. Here, the neighboring blocks of the luminance block may correspond to neighboring positions of the luminance block.

[0424] Fig.24 An example of a neighboring block of a luminance block is shown in FIG. Fig.24 , L_AL may be a neighboring block located at the upper left of the luminance block, L_A may be a neighboring block located at the top of the luminance block, and L_AR may be a neighboring block located at the upper right of the luminance block. In addition, L_L may be a neighboring block located at the left side of the luminance block, and L_BL may be a surrounding block located at the lower left of the luminance block.

[0425] Fig.25 is a flowchart illustrating a method of additionally deriving DM candidates from intra prediction modes of neighboring blocks of a luma block.

[0426] refer to Fig.25 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S2510 ).

[0427] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in a luminance block, and derive DM candidates from intra prediction modes at the different search positions on a first-come-first-served basis according to the search order.

[0428] The different positions within the luminance block and their search order may be as follows.

[0429] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0430] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0431] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0432] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0433] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0434] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number ( S2520 ).

[0435] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number, the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the luma block ( S2530 ).

[0436] The different positions of the neighboring blocks of the luminance block and their search order may be as follows.

[0437] 6. Intra-frame prediction mode of L_L block

[0438] 7. Intra-frame prediction mode of L_A block

[0439] 8. Intra prediction mode of L_BL block

[0440] 9. Intra prediction mode of L_AR block

[0441] 10. Intra prediction mode of L_AL block

[0442] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 10 is less than a predetermined number ( S2540 ).

[0443] When the number of DM candidates derived from the intra prediction modes 1 to 10 is less than a predetermined number, the image encoding apparatus 100 and the image decoding apparatus 200 may derive a DM candidate from a default mode ( S2550 ).

[0444] The number of default patterns used to derive DM candidates may be the same as the predetermined number. The default patterns used to derive DM candidates and their search order may be as follows.

[0445] 11. Planar Intra Prediction Mode

[0446] 12. Vertical intra prediction mode

[0447] 13. Horizontal intra prediction mode

[0448] 14. DC intra prediction mode

[0449] 15. Vertical diagonal (VDIA) intra prediction mode

[0450] The search orders 1 to 15 described above may represent examples for deriving DM candidates. The search orders 1 to 5 may be changed, the search orders 6 to 10 may also be changed, and the default modes 11 to 15 may also be replaced with other modes.

[0451] Fig.26 is a flowchart illustrating another method of additionally deriving DM candidates from intra prediction modes of neighboring blocks of a luma block.

[0452] refer to Fig.26 , the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes at different positions in a luma block corresponding to a chroma block ( S2610 ).

[0453] For example, the image encoding apparatus 100 and the image decoding apparatus 200 sequentially search different positions in the luminance block and derive DM candidates from intra prediction modes at the different search positions on a first-come-first-served basis according to the search order.

[0454] The different positions within the luminance block and their search order may be as follows.

[0455] 1. Intra-frame prediction mode of the CR position of the same luminance block

[0456] 2. Intra-frame prediction mode for the BL position of the same luminance block

[0457] 3. Intra-frame prediction mode for TR position of co-located luminance block

[0458] 4. Intra-frame prediction mode for TL position of co-located luminance block

[0459] 5. Intra-frame prediction mode for BR position of co-located luminance block

[0460] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number ( S2620 ).

[0461] If the number of DM candidates derived from intra prediction modes 1 to 5 is less than a predetermined number, the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the chroma block ( S2630 ).

[0462] For example, the image encoding apparatus 100 and the image decoding apparatus 200 may sequentially search for neighboring blocks of a chrominance block and derive DM candidates from intra prediction modes of the searched neighboring blocks on a first-come-first-served basis according to the search order. The neighboring blocks of the chrominance block and the search order thereof may be as follows.

[0463] 6. Intra-frame prediction mode of L block, L block is the neighboring block of chroma block

[0464] 7. Intra-frame prediction mode of block A, which is a neighboring block of the chrominance block

[0465] 8. Intra-frame prediction mode of BL block, BL block is the neighboring block of chroma block

[0466] 9. Intra-frame prediction mode of AR block, AR block is the neighboring block of chroma block

[0467] 10. Intra-frame prediction mode of AL block, AL block is the neighboring block of chroma block

[0468] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived through steps S2610 and S2630 is less than a predetermined number ( S2640 ).

[0469] If the number of DM candidates derived from intra prediction modes 1 to 10 is less than a predetermined number, the image encoding apparatus 100 and the image decoding apparatus 200 may derive DM candidates from intra prediction modes of different neighboring blocks of the luma block ( S2630 ).

[0470] The different positions of the neighboring blocks of the luminance block and their search order may be as follows.

[0471] 11. Intra-frame prediction mode at position L_L

[0472] 12. Intra-frame prediction mode at L_A position

[0473] 13. Intra-frame prediction mode at L_BL position

[0474] 14. Intra-frame prediction mode at L_AR position

[0475] 15. Intra-frame prediction mode at L_AL position

[0476] The image encoding apparatus 100 and the image decoding apparatus 200 may determine whether the number of DM candidates derived from intra prediction modes 1 to 15 is less than a predetermined number ( S2660 ).

[0477] When the number of DM candidates derived from the intra prediction modes 1 to 15 is less than a predetermined number, the image encoding apparatus 100 and the image decoding apparatus 200 may derive a DM candidate from a default mode ( S2670 ).

[0478] The number of default patterns used to derive DM candidates may be the same as the predetermined number. The default patterns used to derive DM candidates and their search order may be as follows.

[0479] 16. Planar Intra Prediction Mode

[0480] 17. Vertical Intra Prediction Mode

[0481] 18. Horizontal Intra Prediction Mode

[0482] 19. DC intra prediction mode

[0483] 20. Vertical diagonal (VDIA) intra prediction mode

[0484] The above-mentioned search orders 1 to 20 may represent examples for deriving DM candidates. Search orders 1 to 5 may be changed, and search orders 6 to 10 may also be changed. In addition, search orders 11 to 15 may be changed, and the default mode may also be replaced with other modes.

[0485] According to an embodiment, when a neighboring block (AL, A, AR, L, BL) of a chroma block or a neighboring block (L_AL, L_A, L_AR, L_L, L_BL) of a luma block is predicted in an inter-prediction mode rather than an intra-prediction mode, an intra-prediction mode for deriving a DM candidate may be derived based on an IPM (Intra Prediction Mode) intra-mode stored in a corresponding block.

[0486] For example, if the prediction mode of the L_L block is the inter prediction mode, the DM candidate may be derived by considering the IPM intra mode stored in the L_L block as the intra prediction mode of the L_L block.

[0487] The derived DM candidates may be encoded and decoded and signaled by the method proposed in Embodiments 1 to 5 depending on the number thereof. In addition, the derived DM candidates may be encoded by performing binarization by the method proposed in Embodiments 1 to 5 depending on the number thereof, and the encoded DM candidates may be signaled by context modeling. In addition, the derived DM candidates may have their overlap with the default intra prediction mode eliminated by the overlap elimination method proposed in Embodiments 1 to 5.

[0488] Fig. 27 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.

[0489] like Fig. 27 As shown, the content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.

[0490] The encoding server compresses the content input from the multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bit stream and sends the bit stream to the streaming server. As another example, when the multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bit stream, the encoding server can be omitted.

[0491] A bitstream may be generated by an image encoding method or an image encoding device to which an embodiment of the present disclosure is applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0492] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.

[0493] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream within a predetermined time.

[0494] 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, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.

[0495] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.

[0496] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations of methods according to various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.

[0497] Industrial Applicability

[0498] The embodiments of the present disclosure may be used to encode or decode an image.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method include: deriving multiple direct mode (DM) candidates for chroma blocks; Determine a default mode for the chroma block and any one of the plurality of DM candidates based on first information obtained from the bitstream; as well as Based on the determined mode, intra-frame prediction is performed on the chrominance block.

2. The method according to claim 1, in, The number of the plurality of DM candidates is five.

3. The method according to claim 1, in, The deriving of multiple DM candidates comprises: deriving at least one first DM candidate from an intra prediction mode at a different position in a luma block corresponding to the chroma block; and Based on the number of the first DM candidates being less than a predetermined number, at least one third DM candidate is derived from intra prediction modes of different neighboring blocks of the luminance block.

4. The method according to claim 3, in, Deriving the plurality of DM candidates further comprises: Based on the number of the first DM candidates being less than a predetermined number, deriving second DM candidates from intra prediction modes of different neighboring blocks of the chrominance block, Wherein, based on the fact that the sum of the number of the first DM candidates and the number of the second DM candidates is less than the predetermined number, the third DM candidate is derived.

5. The method according to claim 3, in, The deriving of multiple DM candidates further comprises: Based on the sum of the number of the first DM candidates and the number of the third DM candidates being less than the predetermined number, a fourth DM candidate is derived from the default mode.

6. The method according to claim 5, in, The default intra prediction mode includes the intra prediction mode 66.

7. The method according to claim 3, in, The first DM candidate is derived by searching from an upper left position to a lower right position in the luminance block in a raster scan order.

8. The method according to claim 1, further comprising: include: determining a tree type for the chroma block, The multiple DM candidates are derived based on a result of determining the tree type of the chrominance block.

9. The method according to claim 8, in, The plurality of DM candidates are derived based on that a tree type of the chroma block is a dual-tree chroma type.

10. The method according to claim 1, further comprising: include: modifying the default mode based on that the default mode is the same as the plurality of DM candidates, wherein the second default mode among the default modes to be determined to be the same as the plurality of DM candidates is modified to be an intra prediction mode of 2, and The third default mode among the default modes to be determined to be the same as the plurality of DM candidates is modified to be the intra prediction mode 34.

11. The method according to claim 10, in, modifying a fourth default mode among the default modes to be determined to be the same as the plurality of DM candidates to an intra prediction mode of 2, and Among them, the fifth default mode among the default modes to be determined to be the same as the plurality of DM candidates is modified to be the intra prediction mode 10.

12. An image encoding method performed by an image encoding device, the image encoding method include: deriving multiple direct mode (DM) candidates for chroma blocks; Determining a default mode for the chroma block and any one of the plurality of DM candidates; as well as Based on the determined mode, intra-frame prediction is performed on the chrominance block, Wherein, first information indicating the determined mode is encoded in a bit stream.

13. A computer-readable recording medium storing a bit stream generated by the image encoding method of claim 12.

14. A method for transmitting a bit stream generated by an image encoding method, the image encoding method include: deriving multiple direct mode (DM) candidates for chroma blocks; Determining a default mode for the chroma block and any one of the plurality of DM candidates; as well as Based on the determined mode, intra-frame prediction is performed on the chrominance block, Wherein, first information indicating the determined mode is encoded in a bit stream.