Method and apparatus for encoding / decoding image based on convolutional cross-component model (CCCM) prediction, and recording medium storing bitstream

By adopting the intra prediction method of convolutional cross-component model (CCCM) in image encoding/decoding, the problem of low image encoding/decoding efficiency in the prior art is solved, efficient image encoding and decoding is realized, and transmission and Storage cost.

CN119422376APending Publication Date: 2025-02-11LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380048081.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-04-20
Filing Date
2023-04-20
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve image encoding/decoding efficiency, especially when processing high-resolution and high-quality images, the transmission and storage costs are high.

Method used

Using an intra prediction method based on the convolutional cross-component model (CCCM), the image encoding/decoding efficiency is improved by deriving the CCCM coefficients and performing CCCM prediction using multiple models.

Benefits of technology

Efficient image encoding/decoding is realized, reducing transmission and storage costs, and improving encoding/decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119422376A_ABST
    Figure CN119422376A_ABST
Patent Text Reader

Abstract

A method and an apparatus for encoding / decoding an image are provided. A method for decoding an image according to the present disclosure may comprise the steps of: deriving a convolutional cross component model (CCCM) coefficient based on an intra prediction mode of a current chroma block being a CCCM mode; determining a corresponding luma sample in a corresponding luma block corresponding to a current chroma sample in the current chroma block and a neighboring luma sample of the luma sample; deriving at least one representative neighboring luminance sample based on the neighboring luminance samples; and generating a prediction sample of the current chroma sample based on the representative adjacent luminance sample and the CCCM coefficient.
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 and apparatus and a recording medium for storing a bit stream, and more specifically, to an image encoding / decoding method and apparatus based on convolutional cross-component model (CCCM) intra-frame prediction, and a recording medium for storing a bit stream generated by the image encoding method / apparatus of the present disclosure. 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] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus for performing convolutional cross-component model (CCCM) intra prediction.

[0007] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus for efficiently calculating CCCM coefficients.

[0008] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus that performs improved CCCM prediction.

[0009] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus that performs CCCM prediction for each chroma picture / between chroma pictures.

[0010] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus for performing CCCM prediction using multiple models.

[0011] In addition, an 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 or apparatus according to the present disclosure.

[0012] In addition, an 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] In addition, an object of the present disclosure is to provide a method of transmitting a bit stream generated by the image encoding method or 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] According to one embodiment of the present disclosure, an image decoding method performed by an image decoding device may include the following steps: deriving CCCM coefficients based on that the intra-frame prediction mode of a current chroma block is a convolution cross-component model (CCCM) mode; determining a co-located luminance sample in a co-located luminance block corresponding to a current chroma sample in the current chroma block and neighboring luminance samples of the co-located luminance sample; deriving at least one representative neighboring luminance sample based on the neighboring luminance sample; and generating a predicted sample of the current chroma sample based on the representative neighboring luminance sample and the CCCM coefficients.

[0017] According to one embodiment of the present disclosure, the neighboring brightness sample may include at least one of the left neighboring brightness sample, the right neighboring brightness sample, the top neighboring brightness sample, the bottom neighboring brightness sample, the upper left neighboring brightness sample, the upper right neighboring brightness sample, the lower left neighboring brightness sample or the lower right neighboring brightness sample of the co-located brightness sample.

[0018] According to one embodiment of the present disclosure, the representative neighboring brightness samples may be derived based on an average value of the neighboring brightness samples.

[0019] According to one embodiment of the present disclosure, the representative neighboring brightness samples may be derived by downsampling using the co-located brightness samples and the neighboring brightness samples.

[0020] According to one embodiment of the present disclosure, the step of determining the neighboring luma samples or the step of deriving the representative neighboring luma samples may be performed based on side information signaled through a bitstream.

[0021] According to one embodiment of the present disclosure, the representative neighboring brightness samples may include a top representative neighboring brightness sample, a bottom representative neighboring brightness sample, a left representative neighboring brightness sample and a right representative neighboring brightness sample of the co-located brightness sample, the top representative neighboring brightness sample may be derived based on at least one neighboring brightness sample adjacent to the top of the co-located brightness sample, the bottom neighboring brightness sample may be derived based on at least one neighboring brightness sample adjacent to the bottom of the co-located brightness sample, the left representative neighboring brightness sample may be derived based on at least one neighboring brightness sample adjacent to the left side of the co-located brightness sample, and the right representative neighboring brightness sample may be derived based on at least one neighboring brightness sample adjacent to the right side of the co-located brightness sample.

[0022] According to one embodiment of the present disclosure, the representative neighboring brightness samples may include horizontal representative neighboring brightness samples, vertical representative neighboring brightness samples, diagonal representative neighboring brightness samples and anti-diagonal representative neighboring brightness samples, the horizontal representative neighboring brightness samples may be derived based on at least one neighboring brightness sample horizontally adjacent to the co-located brightness sample, the vertical representative neighboring brightness samples may be derived based on at least one neighboring brightness sample vertically adjacent to the co-located brightness sample, the diagonal representative neighboring brightness samples may be derived based on at least one neighboring brightness sample diagonally adjacent to the co-located brightness sample, and the anti-diagonal representative neighboring brightness samples may be derived based on at least one neighboring brightness sample anti-diagonally adjacent to the co-located brightness sample.

[0023] According to one embodiment of the present disclosure, the current chroma block may include a first chroma block and a second chroma block, and the CCCM coefficient for the first chroma block may be derived independently from the CCCM coefficient for the second chroma block.

[0024] According to one embodiment of the present disclosure, the current chroma block may include a first chroma block and a second chroma block, CCCM prediction for the first chroma block may be performed based on the co-located luminance block, and CCCM prediction for the second chroma block may be performed based on the first chroma block.

[0025] According to one embodiment of the present disclosure, the step of deriving the CCCM coefficient may include: determining a reference sample area, and deriving the CCCM coefficient using at least one reference sample in the reference sample area, and the reference sample area may be determined based on information about the CCCM mode.

[0026] According to one embodiment of the present disclosure, the CCCM mode may include a first mode and a second mode, wherein the first mode may be a mode that uses only the area adjacent to the top of the current chroma block and the co-located luminance block as the reference sample area, and the second mode may be a mode that uses only the area adjacent to the left side of the current chroma block and the co-located luminance block as the reference sample area.

[0027] According to one embodiment of the present disclosure, the step of deriving the CCCM coefficient may include: determining a reference sample area, determining a CCCM model of one of two or more CCCM models based on at least one reference sample in the reference sample area, and deriving CCCM coefficients for the determined CCCM model.

[0028] According to one embodiment of the present disclosure, the step of determining the CCCM model may be performed based on a comparison between an average value of at least one reference sample in the reference sample area and a predetermined threshold.

[0029] According to one embodiment of the present disclosure, an image encoding method performed by an image encoding device may include the following steps: deriving CCCM coefficients based on that the intra-frame prediction mode of a current chroma block is a convolution cross-component model (CCCM) mode; determining a co-located luminance sample in a co-located luminance block corresponding to a current chroma sample in the current chroma block and neighboring luminance samples of the co-located luminance sample; deriving at least one representative neighboring luminance sample based on the neighboring luminance sample; and generating a predicted sample of the current chroma sample based on the representative neighboring luminance sample and the CCCM coefficients.

[0030] According to one embodiment of the present disclosure, a method for sending a bitstream generated by an image encoding method may include the following steps: deriving CCCM coefficients based on that the intra-frame prediction mode of a current chroma block is a convolutional cross-component model (CCCM) mode; determining a co-located luminance sample in a co-located luminance block corresponding to a current chroma sample in the current chroma block and neighboring luminance samples of the co-located luminance sample; deriving at least one representative neighboring luminance sample based on the neighboring luminance sample; and generating a predicted sample of the current chroma sample based on the representative neighboring luminance sample and the CCCM coefficient.

[0031] Beneficial Effects

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

[0033] In addition, according to the present disclosure, an image encoding / decoding method and apparatus for performing convolutional cross-component model (CCCM) intra prediction may be provided.

[0034] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus for efficiently calculating CCCM coefficients can be provided.

[0035] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus that perform improved CCCM prediction may be provided.

[0036] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus for performing CCCM prediction for each chroma picture / between chroma pictures may be provided.

[0037] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus for performing CCCM prediction using multiple models may be provided.

[0038] Furthermore, according to the present disclosure, a non-transitory computer-readable recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure may be provided.

[0039] Furthermore, according to the present disclosure, 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 can be provided.

[0040] Furthermore, according to the present disclosure, a method of transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure may be provided.

[0041] 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

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

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

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

[0045] Figure 4 is a flowchart illustrating a video / image encoding method based on intra-frame prediction.

[0046] Figure 5 is a diagram illustrating a configuration of an intra prediction unit according to the present disclosure.

[0047] Figure 6 is a flowchart illustrating a video / image decoding method based on intra-frame prediction.

[0048] Figure 7 is a diagram illustrating a configuration of an intra prediction unit according to the present disclosure.

[0049] Figure 8 is a diagram illustrating multiple reference lines for intra prediction according to one embodiment of the present disclosure.

[0050] Fig. 9 is a diagram illustrating co-located luma samples and neighboring luma samples according to one embodiment of the present disclosure.

[0051] Fig.10 is a diagram illustrating a reference sample area of ​​a chroma block according to one embodiment of the present disclosure.

[0052] Fig.11 is a diagram illustrating a current chrominance block and a co-located luminance block for CCCM prediction according to one embodiment of the present disclosure.

[0053] Fig.12 is a flowchart illustrating a CCCM prediction method according to one embodiment of the present disclosure.

[0054] Fig.13 is a diagram illustrating a chrominance block and a luma block for CCCM prediction according to one embodiment of the present disclosure.

[0055] Fig.14 is a flow chart of a CCCM coefficient derivation method according to one embodiment of the present disclosure.

[0056] Fig.15 is a diagram illustrating a reference sample area according to one embodiment of the present disclosure.

[0057] Fig.16 is a flowchart of a CCCM coefficient derivation method according to another embodiment of the present disclosure.

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

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

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

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

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

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

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

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

[0066] In this disclosure, "video" may mean a set of images over time.

[0067] In the present disclosure, "picture" generally means the basis of representing 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).

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

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

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

[0071] In addition, in the present disclosure, unless explicitly stated as a chroma block, "current block" may mean a block including a luma component block and a chroma component block or a "luminance block of the current block". The luma component block of the current block may be expressed by an explicit description including a luma component block such as "luminance block" or "current luma block". In addition, "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".

[0072] 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".

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

[0074] In the present disclosure, "at least one of A, B, and C" may mean "only A", "only B", "only C", or "any and all combinations of A, B, and C". In addition, "at least one of A, B, or C" or "at least one of A, B and / or C" may mean "at least one of A, B, and C".

[0075] The brackets used in the present disclosure may mean "for example". For example, if "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in the present disclosure is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".

[0076] Overview of Video Coding Systems

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

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

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

[0080] The video source generator 11 can obtain the video / image by the process of capturing, synthesizing or generating the 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 generate the video / image (electronically). 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.

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

[0082] The transmitter 13 may transmit the encoded video / image information or data output in the form of a bit stream to the receiver 21 of the decoding device 20 in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The 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 encoder 12. In this case, the transmitting device includes: at least one processor that obtains the encoded video / image information or data output in the form of a bit stream; and a transmitter that delivers 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 decoder 22.

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

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

[0085] Overview of Image Coding Equipment

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

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

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

[0089] The image segmenter 110 may segment 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 segmenting 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 segmented 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 segmentation 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 segmented. The maximum coding unit may be used as the final coding unit, and the coding unit of a deeper depth obtained by segmenting 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.

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

[0091] The intra prediction unit 185 can predict the current block by referring to the samples in the current picture. Depending on the intra prediction mode and / or the 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 according to the settings. 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.

[0092] The inter prediction unit 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter prediction mode, the motion information may 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 prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present 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 co-located CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter 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 the motion information of the neighboring block as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be sent. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding the 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.

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

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

[0095] The transformer 120 may generate transform coefficients 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 rather than square.

[0096] The quantizer 130 may quantize the transform coefficients and send them to the entropy encoder 190. The entropy encoder 190 may encode the quantized 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.

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

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

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

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

[0101] In addition, as described below, chroma scaling and luminance mapping (LMCS) is applied to the picture coding process.

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

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

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

[0105] Overview of Image Decoding Equipment

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

[0107] 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 prediction unit 260, and an intra-frame prediction unit 265. The inter-frame prediction unit 260 and the intra-frame prediction unit 265 may be collectively referred to as a "prediction unit". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.

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

[0109] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image encoding device 100 may reconstruct the image 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).

[0110] 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 signaled / received information and / or syntax elements described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output 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 can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring block and the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, 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 can 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. The information related to prediction among the information decoded by the entropy decoder 210 can be provided to the prediction unit (inter-frame prediction unit 260 and intra-frame prediction unit 265), and the residual value (ie, quantized transform coefficient and related parameter information) for which entropy decoding is performed in the entropy decoder 210 can be input to the dequantizer 220. In addition, the information about filtering among the information decoded by the entropy decoder 210 can 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 .

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

[0112] 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 the coefficient scanning order performed in the 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.

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

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

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

[0116] The intra prediction unit 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.

[0117] The inter-frame prediction unit 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 prediction unit 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.

[0118] 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 prediction unit 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 also applies 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.

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

[0120] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter-frame prediction unit 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 prediction unit 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.

[0121] In the present disclosure, the implementations 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 prediction unit 260 and the intra-frame prediction unit 265 of the image decoding device 200.

[0122] Overview of intra prediction

[0123] Hereinafter, intra prediction according to the present disclosure will be described.

[0124] Intra-frame prediction may refer to a prediction for generating a prediction sample of a current block based on a reference sample in a picture to which the current block belongs (hereinafter referred to as the current picture). When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame 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.

[0125] However, some neighboring reference samples of the current block have not been decoded or may not be available. In this case, the decoder 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.

[0126] When deriving neighboring reference samples, (i) the prediction sample may be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample may be derived based on reference samples existing in a specific (prediction) direction relative to the prediction sample 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.

[0127] In addition, the prediction sample can be generated by interpolating the first neighboring sample set in the prediction direction of the intra prediction mode of the current block based on the prediction target sample of the current block among the neighboring reference samples and the second neighboring sample set in the opposite direction thereof. The above situation can be called linear interpolation intra prediction (LIP).

[0128] In addition, a linear model can be used to generate chrominance prediction samples based on luma samples. This case can be called LM (linear model) mode.

[0129] In addition, the temporary prediction sample of the current block can be derived based on the filtered neighboring reference sample, and the prediction sample of the current block can be derived by the weighted sum of at least one reference sample derived according to the intra prediction mode among the temporary prediction sample and the existing neighboring reference sample (that is, the unfiltered neighboring reference sample). The above situation can be called position-dependent intra prediction (PDPC).

[0130] 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, information about the reference sample line used (e.g., intra_luma_ref_idx) may be encoded in the bitstream and signaled. This situation may be referred to as multi-reference line (MRL) intra prediction or MRL-based intra prediction. When MRL is not applied, reference samples may be derived from reference sample lines directly adjacent to the current block, and in this case, information about the reference sample line may not be signaled.

[0131] In addition, the current block can be divided into vertical or horizontal sub-partitions, and for each sub-partition, intra prediction can be performed based on the same intra prediction mode. In this case, the neighboring reference samples for intra prediction can be derived in units of sub-partitions. That is, the reconstructed samples of the previous sub-partition in the encoding / decoding order can be used as neighboring reference samples for the current sub-partition. 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 can be improved by deriving and using neighboring 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.

[0132] These intra-frame prediction techniques may be referred to as intra-frame prediction types or additional intra-frame prediction modes to distinguish them from directional or non-directional intra-frame prediction modes. Intra-frame prediction techniques (intra-frame prediction types, additional intra-frame prediction modes, etc.) may be referred to as various terms such as intra-frame prediction techniques or additional intra-frame prediction modes. For example, the intra-frame prediction type (or additional intra-frame prediction mode, etc.) may include at least one of the above-mentioned LIP, LM, PDPC, MRL or ISP. Common intra-frame prediction methods that exclude specific intra-frame prediction types such as LIP, LM, PDPC, MRL and ISP may be referred to as normal intra-frame prediction types. Normal intra-frame prediction types can generally be applied when the above specific intra-frame prediction types are not applied, and predictions can be performed based on the above intra-frame prediction modes. In addition, if necessary, post-processing filtering may be performed on the derived prediction samples.

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

[0134] In addition, in addition to the above-mentioned intra prediction types, affine linear weighted intra prediction (ALWIP) can also be used. ALWIP can also be called linear weighted intra prediction (LWIP) or matrix weighted intra prediction (MWIP) or matrix-based intra prediction (MIP). If MIP is applied to the current block, i) use the neighboring reference samples for which the averaging process has been performed, ii) perform the matrix vector multiplication process, and iii) further perform the horizontal / vertical interpolation process when necessary to derive the prediction sample for the current block. 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 for MIP can be called 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 for MIP. Here, the matrix can be called a (MIP) weighting matrix, and the offset can be called a (MIP) offset vector or a (MIP) offset vector. The specific MIP method will be described later.

[0135] Will refer to later Figure 4 and Figure 5 A block reconstruction process based on intra prediction and intra prediction units in an encoding device is described.

[0136] Figure 4 is a flowchart illustrating a video / image encoding method based on intra-frame prediction.

[0137] Can be Figure 2 The image encoding device performs Figure 4 The encoding method of the present invention is a method for encoding a video image. Specifically, step S410 can be performed by the intra prediction unit 185, and step S420 can be performed by the residual processor. Specifically, step S420 can be performed by the subtractor 115. Step S430 can be performed by the entropy encoder 190. The prediction information of step S430 can be derived by the intra prediction unit 185, and the residual information of step S430 can be derived by the residual processor. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficient of the residual sample. As described above, the residual sample can be derived into the transform coefficient by the transformer 120 of the encoding device, and the transform coefficient can be derived into the quantized transform coefficient by the quantizer 130. The information about the quantized transform coefficient can be encoded by the entropy encoder 190 through the residual encoding process.

[0138] The image encoding device may perform intra prediction for the current block (S410). The image encoding device 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.

[0139] Figure 5 is a diagram illustrating a configuration of the intra prediction unit 185 according to the present disclosure.

[0140] like Figure 5 As shown, the intra prediction unit 185 of the encoding device 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 the neighboring reference samples of the current block, and the prediction sample derivation unit 188 may derive the prediction sample of the current block. In addition, although not shown, when performing the prediction sample filtering process described below, the intra prediction unit 185 may further include a prediction sample filter (not shown).

[0141] The image encoding apparatus may determine a mode / type applied to the current block from among a plurality of intra prediction modes / types. The encoding apparatus may compare RD costs of the intra prediction modes / types and determine an optimal intra prediction mode / type for the current block.

[0142] In addition, the image encoding device 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.

[0143] Refer again Figure 4 , the image encoding device may generate a residual sample of the current block based on the prediction sample or the filtered prediction sample (S420). The image encoding device may derive the residual sample by subtracting the prediction sample from the original sample of the current block. That is, the image encoding device may derive the residual sample value by subtracting the prediction sample value from the original sample value.

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

[0145] The residual information may include the following residual encoding syntax. The encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.

[0146] In addition, as described above, the image encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding device 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 decoding device as described above. The image encoding device 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.

[0147] Figure 6 is a flowchart illustrating a video / image decoding method based on intra-frame prediction.

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

[0149] Figure 6 The decoding method can be obtained by Figure 3 The image decoding device of the present invention may perform the above steps. S610 to S630 may be performed by the intra prediction unit 265 of the decoding device, and the prediction information of S610 and the residual information of S640 may be obtained from the bitstream by the entropy decoder 210 of the decoding device. The residual processor of the image decoding device may derive the residual samples of the current block based on the residual information (S640). 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 an inverse transform on the transform coefficient to derive the residual samples of the current block. Step S650 may be performed by the adder 235 or the reconstructor of the decoding device.

[0150] Specifically, the image decoding device may derive the intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) (S610). The image decoding device may derive the neighboring reference samples of the current block (S620). The image decoding device may generate the prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples (S630). In this case, the image decoding device 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.

[0151] The image decoding device generates a residual sample of the current block based on the received residual information (S640). The image decoding device can 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 (S650). 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.

[0152] Figure 7 is a diagram illustrating a configuration of the intra prediction unit 265 according to the present disclosure.

[0153] like Figure 7 As shown, the intra prediction unit 265 of the image decoding device may include an intra prediction mode / type determination unit 266, a reference sample derivation unit 267, and a prediction sample derivation unit 268. The intra prediction mode / type determination unit 266 may determine the intra prediction mode / type of the current block based on the intra prediction mode / type information obtained by the intra prediction mode / type determination unit 186 of the image encoding device, the reference sample derivation unit 266 may derive the neighboring reference samples of the current block, and the prediction sample derivation unit 268 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).

[0154] 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 MPM is applied to the current block, the intra-frame 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 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 decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.

[0155] In addition, the intra-frame prediction technology information can be implemented in various forms. For example, the intra-frame prediction technology information may include intra-frame prediction technology index information specifying one of the intra-frame prediction technologies. As another example, the intra-frame prediction technology 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 (e.g., intra_subpartitions_split_flag) specifying the type of division of the sub-partition when ISP is applied, specifying whether PDCP is applied or at least one of 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. In the present disclosure, the ISP flag information may be referred to as an ISP application indicator.

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

[0157] In addition, in addition to the planar mode, DC mode and angular intra prediction mode, the intra prediction mode may also include a cross-component linear model (CCLM) mode for chroma samples. The CCLM mode may be divided into L_CCLM, T_CCLM, LT_CCLM according to whether the left sample, the upper sample or both are considered for CCLM parameter derivation, and may be applied only to the chroma component.

[0158] The intra prediction modes may be indexed, for example, as shown in Table 1 below.

[0159] [Table 1]

[0160] Intra prediction mode Association Name 0 INTRA_PLANAR 1 INTRA_DC 2..66 INTRA_ANGULAR2..INTRA_ANGULAR66 81..83 INTRA_LT_CCLM,INTRA_L_CCLM,INTRA_T_CCLM

[0161] In addition, the intra prediction type (or additional intra prediction mode) may include at least one of LIP, PDPC, MRL, ISP, or MIP. The intra prediction type may be indicated based on the intra prediction type information, and the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of the following items: reference sample line information indicating whether MRL is applied to the current block and which reference sample line is used if applicable (e.g., intra_luma_ref_idx); ISP flag information indicating whether ISP is applied to the current block (e.g., Intra_subpartitions_mode_flag); ISP type information indicating the split type of the sub-partition when applying ISP (e.g., Intra_subpartitions_split_flag); flag information indicating whether PDCP is applied; or flag information indicating whether LIP is applied. In addition, the intra prediction type information may include a MIP flag (or referred to as intra_mip_flag) indicating whether MIP is applied to the current block.

[0162] MRL (Multiple Reference Lines) Intra Prediction

[0163] Figure 8 is a diagram illustrating multiple reference lines for intra prediction according to one embodiment of the present disclosure.

[0164] In conventional intra prediction, only the neighboring samples of the first line above and the first line to the left of the current block are used as reference samples for intra prediction. However, in the multiple reference line (MRL) method, the neighboring samples located on the sample line spaced one to three samples above and / or to the left of the current block may be used as reference samples to perform intra prediction. Alternatively, the neighboring samples located at the samples separated by N samples above and / or to the left of the current block may be used as reference samples to perform intra prediction using the MRL method. Figure 8 An example of multiple reference lines is shown, where a multiple reference line index (eg, mrl_idx) indicates which line is used for intra prediction with respect to a current block.

[0165] For example, the multiple reference line index may be signaled through a coding unit syntax as shown in Table 2. The multiple reference line index may be configured in the form of an intra_luma_ref_idx syntax element.

[0166] [Table 2]

[0167] coding_unit(x0,y0,cbWidth,cbHeight,treeType){ if (slice_type!=I){ cu_skip_flag[x0][y0] if(cu_skip_flag[x0][y0]==0) pred_mode_flag } if(CuPredMode[x0][y0]==MODE_INTRA){ if(treeType==SINGLE_TREE||treeType==DUAL_TREE_LUMA){ if ((y0%CtbSizeY)>0) intra_luma_ref_idx[x0][y0]… if(intra_luma_ref_idx[x0][y0]==0) intra_luma_mpm_flag[x0][y0] if(intra_luma_mpm_flag[x0][y0]) intra_luma_mpm_idx[x0][y0] Else intra_luma_mpm_remainder[x0][y0] } … }

[0168] intra_luma_ref_idx[x0][y0] may represent the intra-frame reference line index IntraLumaRefLineIdx[x0][y0]. If intra_luma_ref_idx[x0][y0] does not exist, its value may be inferred to be 0. intra_luma_ref_idx may be referred to as an (intra-frame) reference sample line index or mrl_idx. In addition, intra_luma_ref_idx may also be referred to as intra_luma_ref_line_idx. Table 3 below shows the value of IntraLumaRefLineIdx[x0][y0] based on intra_luma_ref_idx[x0][y0].

[0169] [Table 3]

[0170] intra_luma_ref_idx[x0][y0] IntraLumaRefLineIdx[x0][y0] 0 0 1 1 2 3

[0171] MRL can be disabled for blocks of the first line (row) in a CTU. That is, if the upper boundary of the current block is the boundary of the CTU, MRL may not be used for the current block. In Table 2, if the upper boundary of the current block is the boundary of the CTU, intra_luma_ref_idx[x0][y0] does not exist and its value is inferred to be 0. Therefore, the first reference line can be used for the current block. This is to prevent the use of extended reference lines outside the current CTU line. In addition, when the above-mentioned additional reference lines are used, the above-mentioned PDPC can be disabled.

[0172] Generic prediction sample derivation for chroma components

[0173] When intra prediction is performed on the current block, prediction of the luminance component block (luminance block) of the current block and prediction of the chrominance component block (chrominance block) can be performed. In this case, the intra prediction mode for the chrominance component (chrominance block) can be set separately from the intra prediction mode for the luminance component (luminance block).

[0174] For example, the intra prediction mode for the chroma component 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 including at least one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), a L_CCLM, a T_CCLM, a LT_CCLM, a CCCM (convolutional cross-component model), a CCCM_A, and a CCCM_L mode. DM may also be referred to as a direct mode. CCLM may be referred to as a LM.

[0175] The CCLM mode is an intra prediction mode using the correlation between a luminance block and a chrominance block corresponding to the luminance block, and may indicate a mode in which a linear model may be derived based on neighboring samples of the luminance block and neighboring samples of the chrominance block, and prediction samples of the chrominance block may be derived based on the linear model and reconstructed samples of the luminance block. Specifically, when the CCLM mode is applied to the current chrominance block, parameters of the linear model may be derived based on neighboring samples for intra prediction of the current chrominance block and neighboring samples for intra prediction of the current luminance block.

[0176] The CCLM mode can be extended to the MMLM mode. For example, three MMLM modes can be added. A threshold can be used to classify the neighboring samples reconstructed in each MMLM mode into two groups. The threshold can be, for example, the average value of the reconstructed brightness samples. The linear mean square (LMS) method can be used to derive a linear model for each group. Even in the CCLM mode, the LMS method can be used to derive a linear model.

[0177] When using MMLM, there may be two or more linear models between the luma samples and the chroma samples in the CU. In this method, the neighboring luma samples and the neighboring chroma samples of the current block may be classified into multiple groups. In addition, each group may be used as a training set to derive a linear model. That is, CCLM parameters (e.g., α and / or β) may be derived for each group. In addition, the same method as that used to classify neighboring luma samples may be used to classify the samples within the current luma block.

[0178] In this method, neighboring samples can be classified into M groups. Here, M can be 2 or 3. When M is 2 or 3, in addition to the original LM mode, the MMLM method can be designed with two additional chrominance prediction modes, called MMLM2 and MMLM3. The image encoding device can select the best mode in the RDO process and signal the mode.

[0179] Overview of Convolutional Cross-Component Model (CCCM)

[0180] The chroma samples can be predicted from the reconstructed luma samples by applying concepts similar to those performed by the above-mentioned CCLM mode. For example, when the CCCM prediction mode is performed, the reconstructed luma samples can be used to predict the chroma samples. When chroma subsampling is used, the reconstructed luma samples can be downsampled to match the low-resolution chroma grid (block). In addition, the CCCM mode may include a single model or a multi-model. Here, the multi-model may be a model using two models. One of the two models included in the multi-model may be applied to samples having a value greater than or equal to the average value of the luma reference sample. The other of the two models included in the multi-model may be applied to samples having a value less than the average value of the luma reference sample. Here, the luma reference sample may mean a sample included in a luma reference region adjacent to a co-located luma block. The multi-model CCCM mode may be applied to a PU having at least 128 or more available reference samples. However, the present disclosure is not limited thereto, and the multi-model CCCM mode may be applied to a PU having less than 128 available reference samples. The number of available reference samples as a criterion for the PU to which the CCCM mode can be applied is not limited to 128, and may be, for example, 256 or 64. Alternatively, the number of available reference samples may be determined differently according to the size of the PU.

[0181] Convolutional Filters

[0182] The 7-tap filter proposed in the CCCM prediction mode can be composed of a 5-tap filter, a nonlinear term, and a bias term. Here, the 5-tap filter can be a plus-shaped spatial filter that uses neighboring luminance samples at polymorphic positions based on the co-located luminance samples in the co-located luminance block. Fig. 9 The components that make up the 5-tap filter are described in detail.

[0183] Fig. 9 is a diagram illustrating co-located luma samples and neighboring luma samples. The components constituting the 5-tap filter may be composed of co-located luma samples (C) 910 corresponding to the predicted target chroma samples, top / north (N) neighboring luma samples 920 of the co-located luma samples, bottom / south (S) neighboring luma samples 930, right / east (E) neighboring luma samples 940, and left / west (W) neighboring luma samples 950.

[0184] The nonlinear term P as one of the components constituting the 7-tap filter can be expressed as the square of the co-located luminance sample value C and can be scaled to the sample value range of the content. The following formula 1 can be an example of deriving the nonlinear term P. In addition, formula 2 can be an example of deriving the nonlinear term P in the case of 10-bit content.

[0185] [Formula 1]

[0186] P=(C*C+midVal)>>bitDepth

[0187] [Formula 2]

[0188] P=(C*C+512)>>10

[0189] The bias term B, which is one of the components that make up the 7-tap filter, can be expressed as a scalar offset between the input and the output. This can be similar to the offset term of the CCLM. In addition, the bias term B can be set to the median of the chroma samples. For example, in the case of 10-bit content, the bias term B can be 512.

[0190] The output of the 7-tap filter can be calculated by convolution between the filter coefficients Ci and the input value, and can be clipped to the range of valid chroma samples. The following Equation 3 can be an example of deriving predicted sample values ​​of chroma samples using the CCCM prediction mode.

[0191] [Formula 3]

[0192] predChromaVal=c0C+c1N+c2S+c3E+c4W+c5P+c6B

[0193] Calculation of CCCM filter coefficients

[0194] The filter coefficient Ci may be calculated by minimizing the mean square error (MSE) between the reconstructed chroma samples in the reference region and the predicted chroma samples. Here, the MSE may be a function representing the difference between the reconstructed chroma samples in the reference region and the predicted chroma samples. The "filter coefficient" mentioned in the present disclosure may be referred to as a term such as "CCCM coefficient", "CCCM filter coefficient". In the following, reference will be made to Fig.10 Describe in detail the method of calculating the filter coefficients.

[0195] Fig.10 is a diagram illustrating a reference sample area of ​​a chroma block used to calculate filter coefficients. Fig.10 The reference region is illustrated as consisting of the chroma samples of six lines adjacent to the top of the current PU and the chroma samples of six lines adjacent to the left. The reference region can be extended to the upper right region of the PU boundary, and the extension degree is as large as the width of the PU. In addition, the reference region can be extended to the lower left region of the PU boundary, and the extension degree is as large as the height of the PU. The reference region according to the present disclosure can be adjusted to include only available samples. Fig.10 As shown, the reference region may be extended to have reference samples 1010. The extension of the reference region may be necessary to support the edge samples of the above-mentioned plus-shaped spatial filter. In addition, the extended reference samples 1010 present in the unavailable region may be filled.

[0196] The MSE minimization for the filter coefficients Ci can be performed by obtaining the autocorrelation matrix for the luminance input and calculating the cross-correlation vector between the luminance input and the chrominance output. The autocorrelation matrix can be decomposed using LDL decomposition, and the final filter coefficients can be calculated using reverse substitution. This process can be the same as the calculation process of the ALF (adaptive loop filter) filter coefficients, but LDL decomposition can be selected instead of Cholesky decomposition to avoid the use of square root operations. The method proposed above can use only integer operations.

[0197] Bit-string signaling

[0198] The use of CCCM prediction mode can be signaled with a context adaptive binary arithmetic coding (CABAC) coded PU level flag. A new CABAC context can be included to support this. When the CCCM flag is signaled, the CCCM prediction mode can be considered a sub-mode of the CCLM prediction mode. That is, the CCCM flag can be signaled only when the intra-frame prediction mode is LM_CHROMA_IDX (single-mode CCCM enabled) or MMLM_CHROMA_IDX (multi-mode CCCM enabled).

[0199] Hereinafter, an image encoding / decoding method according to an embodiment of the present disclosure will be described in detail.

[0200] The present disclosure relates to intra prediction. Specifically, the present disclosure relates to intra prediction of chroma blocks and CCCM prediction mode. CCCM prediction mode can be a mode for performing prediction by filtering using co-located luminance samples corresponding to chroma samples and neighboring luminance samples of the co-located luminance samples. This can be similar to ALF (Adaptive Loop Filter) and / or CC-ALF (Cross-Component Adaptive Loop Filter) methods.

[0201] The CCCM prediction mode may utilize CCCM coefficients calculated using reference sample lines of six neighboring lines of the current chroma block. The present disclosure may use CCCM coefficients to perform cross-component prediction.

[0202] According to the present disclosure, CCCM prediction can reduce the high algorithmic complexity of existing CCCM prediction by reducing the number of filters. In addition, the present disclosure can perform improved CCCM prediction by utilizing adjacent luminance samples of co-located luminance samples. In addition, the present disclosure can minimize the reduction of encoding and decoding efficiency by applying various operations to co-located luminance samples and / or adjacent luminance samples.

[0203] Implementation Method 1

[0204] In the following, a prediction method based on the CCCM mode according to an embodiment of the present disclosure will be described. According to one embodiment of the present disclosure, the prediction of the current chroma sample in the current chroma block can be performed based on the CCCM prediction mode. For CCCM prediction, the present disclosure can use the co-located luma sample, the neighboring luma sample and / or the CCCM coefficient of the current chroma sample to perform the prediction of the current chroma sample. In the following, reference will be made to Fig.11 Give a detailed description.

[0205] Fig.11 1 is a diagram illustrating a current chroma block and a co-located luma block for CCCM prediction. The present disclosure may predict a current chroma sample 1120 present in the current chroma block 1110 using a co-located luma sample 1140 in the co-located luma block 1130 and a neighboring luma sample (at least one of E, W, S, N, NW, NE, SW, or SE) of the co-located luma sample. More specifically, the present disclosure may predict the current chroma sample 1120 using the following formula 4.

[0206] [Formula 4]

[0207] -C_neighbor=(W+N+S+E+2)>>2

[0208] -P=(C*C+midVal)>>bitDepth(if bitdepth=10,P=(C*C+512)>>10)

[0209] -predChromaVal=c0C+c1C_neighbor+c2P+c3B

[0210] In Formula 4, the bias term B can represent a scalar offset between the input and the output, and can be set to the median of the chrominance value. This can be the same as the case of CCLM. For example, in the case of 10-bit content, the bias term B can be 512. In Formula 4, C_neighbor can mean the average value of four samples among the neighboring luminance samples of the co-located luminance sample 1140 of the current chrominance sample 1120. For example, C_neighbor can mean the average value of the left neighboring luminance sample, the right neighboring luminance sample, the top neighboring luminance sample, and the bottom neighboring luminance sample of the co-located luminance sample 1140. According to one embodiment of the present disclosure, C_neighbor can mean the average value of at least one or more of the left sample, the right sample, the top sample, the bottom sample, the upper left sample, the lower left sample, the upper right sample, or the lower right sample, and the present disclosure is not limited to this.

[0211] P of Formula 4 is a nonlinear term, and midVal may mean a median pixel of the current image. For example, when the bitdepth is 10, the nonlinear term P may be calculated as follows.

[0212] P=(C*C+512)>>10

[0213] In addition, predChromaVal of Formula 4 may mean a chrominance sample value predicted by CCCM prediction according to the present disclosure. That is, as in Formula 4, CCCM prediction may be performed using the same-position luminance sample 1140 and the average value C_neighbor of four neighboring samples. Therefore, when performing CCCM prediction, a 4-tap filter may be used to replace the existing 7-tap filter. The present disclosure may reduce the algorithm calculation complexity by reducing the number of CCCM coefficients.

[0214] According to another embodiment of the present disclosure, the present disclosure may use a 3-tap filter by removing the nonlinear term P as in Equation 5.

[0215] [Formula 5]

[0216] -predChromaVal=c0C+c1C_neighbor+c2B

[0217] Fig.12 is a flow chart illustrating a CCCM prediction method. Fig.12 The prediction method can correspond to Figure 4 Step S410. In addition, Fig.12 The prediction method can correspond to Figure 6 Steps S610 to S630. Fig.12 , the image decoding device 200 can derive CCCM coefficients (S1210). Specifically, if the intra prediction mode of the current chroma block is the CCCM mode, the image decoding device 200 can derive CCCM coefficients. At this time, the CCCM coefficients can be derived according to the implementation of CCCM prediction based on the present disclosure. For example, if CCCM prediction is performed based on the above formula 4, the derivation of CCCM coefficients for the corresponding CCCM prediction can also be performed based on the above formula 4. At this time, a reference chroma sample in a reference area adjacent to the current chroma block, a co-located reference luminance sample corresponding to the reference chroma sample as a sample in a reference area adjacent to the luminance block corresponding to the chroma block, and / or an adjacent reference luminance sample adjacent to the co-located reference luminance sample can be used.

[0218] The image decoding device 200 may determine a co-located luma sample and an adjacent luma sample (S1220). Here, the co-located luma sample may be a co-located luma sample in a luma block corresponding to a current chroma sample in a current chroma block. In addition, the adjacent luma sample may be a sample adjacent to the co-located luma sample. Specifically, the adjacent luma sample may include at least one of a left adjacent luma sample, a right adjacent luma sample, a top adjacent luma sample, a bottom adjacent luma sample, an upper left adjacent luma sample, an upper right adjacent luma sample, a lower left adjacent luma sample, or a lower right adjacent luma sample of the co-located luma sample.

[0219] The image decoding device 200 may derive at least one representative neighboring luminance sample (S1230). At this time, at least one representative neighboring luminance sample may be derived based on the neighboring luminance samples. Specifically, the representative neighboring luminance sample may be derived based on the average value of the neighboring luminance samples. Alternatively, the representative neighboring luminance sample may be derived by downsampling the co-located luminance sample and the neighboring luminance sample.

[0220] The image decoding device 200 may generate a prediction sample of the current chrominance sample (S1240). Specifically, the image decoding device 200 may generate a prediction sample of the current chrominance sample based on a representative neighboring luma sample and a CCCM coefficient. For example, the prediction sample of the current chrominance sample may be generated using Equation 4 or Equation 5.

[0221] Although various embodiments according to the present disclosure have been described as being performed in the image decoding apparatus 200 , it is apparent to those skilled in the art that corresponding or identical operations may also be performed in the image encoding apparatus 100 .

[0222] According to another embodiment of the present disclosure, as in Formula 6, the present disclosure may generate a prediction sample of the current chroma sample 1120 by using an average value C_neighbor of eight neighboring luminance samples. At this time, the eight neighboring luminance samples may mean a left neighboring luminance sample, a right neighboring luminance sample, a top neighboring luminance sample, a bottom neighboring luminance sample, an upper left neighboring luminance sample, a lower left neighboring luminance sample, an upper right neighboring luminance sample, and a lower right neighboring luminance sample of the same-position luminance sample 1140. In this case, a 4-tap filter may be used to generate a prediction sample of the current chroma sample 1120. Alternatively, by removing the nonlinear term P, a 3-tap filter may be used to generate a prediction sample of the current chroma sample 1120.

[0223] [Formula 6]

[0224] -C_neighbor=(W+N+S+E+NW+NE+SW+SE+4)>>3

[0225] - P = (C*C+midVal)>>bitDepth (if bitDepth=10, p = (C*C+512)>>10)

[0226] -predChromaVal=c0C+c1C_neighbor+c2P+c3B

[0227] -predChromaVal = c0C + c1C_neighbor + c2B (without nonlinear terms)

[0228] According to another embodiment of the present disclosure, as in Formula 7, the present disclosure may generate a prediction sample of the current chroma sample 1120 by using a weighted average C_neighbor of eight neighboring luma samples. In this case, the prediction sample of the current chroma sample 1120 may be generated by using a 4-tap filter. Alternatively, by removing the nonlinear term P, the prediction sample of the current chroma sample 1120 may be generated by using a 3-tap filter.

[0229] [Formula 7]

[0230] -C_neighbor=(3*W+3*N+3*S+3*E+NW+NE+SW+SE+8)>>4

[0231] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0232] -predChromaVal=c0C+c1C_neighbor+c2p+c3B

[0233] -predChromaVal = c0C + c1C_neighbor + c2B (without nonlinear terms)

[0234] In the above formula 7, the weights applied to the neighboring luminance samples adjacent to the top, bottom, left, and right of the co-located luminance sample can be set to be greater than the weights applied to the neighboring luminance samples adjacent to the diagonal direction of the co-located luminance sample. The weights or neighboring luminance samples of the weighted average are not limited to the above examples and can be changed in various ways.

[0235] According to another embodiment of the present disclosure, as in Formula 8, the present disclosure may generate a prediction sample of the current chroma sample 1120 by using a horizontal representative neighboring luminance sample C_hor and a vertical representative neighboring luminance sample C_ver. Here, the horizontal representative neighboring luminance sample C_hor may mean the average value of the left neighboring luminance sample and the right neighboring luminance sample of the same luminance sample. The vertical representative neighboring luminance sample C_ver may mean the average value of the top neighboring luminance sample and the bottom neighboring luminance sample of the same luminance sample. In this case, a 5-tap filter may be used to generate the prediction sample of the current chroma sample 1120. Alternatively, by removing the nonlinear term P, a 4-tap filter may be used to generate the prediction sample of the current chroma sample 1120.

[0236] [Formula 8]

[0237] -C_hor=(W+E+1)>>2

[0238] -C_ver=(N+S+1)>>2

[0239] - p = (C * C + midVal) > > bitDepth (if bitDepth = 10, P = (C * C + 512) > > 10

[0240] -predChromaVal=c0C+c1C_hor+c2C_ver+c3P+c4B

[0241] -predChromaVal = c0C + c1C_hor + c2C_ver + c3B (without nonlinear terms)

[0242] According to another embodiment of the present disclosure, as in Formula 9, the present disclosure may generate a prediction sample of the current chroma sample 1120 by using the downsampled value C_ds of the co-located luma sample and the adjacent luma sample. In this case, the prediction sample of the current chroma sample 1120 may be generated by using a 3-tap filter. Alternatively, by removing the nonlinear term P, the prediction sample of the current chroma sample 1120 may be generated by using a 2-tap filter.

[0243] [Formula 9]

[0244] -C_ds=(4*C+W+N+S+E+4)>>3

[0245] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0246] -predChromaVal=c0C_ds+c1P+c2B

[0247] -predChromaVal = c0C_ds + c1B (without nonlinear terms)

[0248] C_ds of Formula 9 may be a downsampled value of a co-located luma sample and an adjacent luma sample. According to an embodiment of the present disclosure, the value of C_ds may be calculated using various combinations of adjacent luma samples as in the formula. The following formula is an equation for calculating C_ds according to various embodiments of the present disclosure, and the present disclosure is not limited thereto, and the value of C_ds may be calculated using various combinations of adjacent luma samples.

[0249] -C_ds=(4*C+W+N+S+E+4)>>3

[0250] -C_ds=(4*C+2*W+2*N+2*S+2*E+NW+NE+SW+SE+8)>>4

[0251] -C_ds=(8*C+W+N+S+E+NW+NE+SW+SE+8)>>4

[0252] -C_ds=(2*C+2*S+W+E+SW+SE+4)>>3

[0253] To calculate the value of C_ds, the weight applied to the co-located luma sample may be set to be greater than or equal to the weight applied to the neighboring luma samples adjacent to the top, bottom, left, and right of the co-located luma sample. In addition, the weight applied to the neighboring luma samples adjacent to the top, bottom, left, and right of the co-located luma sample may be set to be greater than or equal to the weight applied to the neighboring luma samples adjacent to the diagonal direction of the co-located luma sample.

[0254] According to another embodiment of the present disclosure, weights applied to neighboring luma samples adjacent to the top, bottom, left, and right of the co-located luma sample may be different from each other. The weights or neighboring luma samples of the weighted average are not limited to the above examples and may be variously changed.

[0255] According to another embodiment of the present disclosure, as in Formula 10, the present disclosure may use one neighboring luma sample C_1 to generate a prediction sample of the current chroma sample 1120. In this case, a 4-tap filter may be used to generate the prediction sample of the current chroma sample 1120. Alternatively, by removing the nonlinear term P, a 3-tap filter may be used to generate the prediction sample of the current chroma sample 1120.

[0256] [Formula 10]

[0257] -C_1=S

[0258] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0259] -predChromaVal=c0C+c1C_1+c2P+c3B

[0260] -predChromaVal=c0C+c1C_1+c2B(without nonlinear term)

[0261] At this time, C_1 can be the value of one of the neighboring brightness samples, and the neighboring brightness sample can be one of the left neighboring brightness sample, the right neighboring brightness sample, the top neighboring brightness sample, the bottom neighboring brightness sample, the upper left neighboring brightness sample, the upper right neighboring brightness sample, the lower left neighboring brightness sample, or the lower right neighboring brightness sample of the same-positioned brightness sample.

[0262] According to another embodiment of the present disclosure, as in Formula 11, the present disclosure may generate a prediction sample of the current chroma sample 1120 by using two adjacent luma samples C_1 and C_2. In this case, the prediction sample of the current chroma sample 1120 may be generated by using a 5-tap filter. Alternatively, by removing the nonlinear term P, the prediction sample of the current chroma sample 1120 may be generated by using a 4-tap filter.

[0263] [Formula 11]

[0264] -C_1=S

[0265] -C_2=E

[0266] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0267] -predChromaVal=c0C+c1C_1+c2C_2+c3P+c4B

[0268] -predChromaVal=c0C+c1C_1+c2C_2+c3B (without nonlinear term)

[0269] At this time, the neighboring luma samples used to generate the predicted sample of the current chroma sample 1120 can be two samples of the left neighboring luma sample, the right neighboring luma sample, the top neighboring luma sample, the bottom neighboring luma sample, the upper left neighboring luma sample, the upper right neighboring luma sample, the lower left neighboring luma sample or the lower right neighboring luma sample of the same-position luma sample.

[0270] According to another embodiment of the present disclosure, as in Formula 12, the present disclosure may use three neighboring luma samples C_1, C_2, and C_3 to generate a prediction sample of the current chroma sample 1120. In this case, a 6-tap filter may be used to generate a prediction sample of the current chroma sample 1120. Alternatively, by removing the nonlinear term P, a 5-tap filter may be used to generate a prediction sample of the current chroma sample 1120.

[0271] [Formula 12]

[0272] -C_1=S

[0273] -C_2=E

[0274] -C_3=W

[0275] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0276] -predChromaVal=c0C+c1C_1+c2C_2+c3C_2+c4P+c5B

[0277] -predChromaVal=c0C+c1C_1+c2C_2+c3C_2+c4B(without nonlinear term)

[0278] At this time, the neighboring luma samples used to generate the predicted sample of the current chroma sample 1120 can be three samples of the left neighboring luma sample, the right neighboring luma sample, the top neighboring luma sample, the bottom neighboring luma sample, the upper left neighboring luma sample, the upper right neighboring luma sample, the lower left neighboring luma sample or the lower right neighboring luma sample of the same-position luma sample.

[0279] The determination of neighboring luma samples or the derivation of representative neighboring luma samples according to the present disclosure may be performed based on side information signaled through a bitstream. Here, the side information may be a mode flag or an index, etc.

[0280] According to an embodiment of the present disclosure, the computational complexity can be reduced by reducing the number of filters used for CCCM prediction. That is, by using fewer CCCM coefficients than conventional CCCM prediction methods, the encoding / decoding efficiency can be improved.

[0281] Implementation Method 2

[0282] According to the present disclosure, a 7-tap filter CCCM prediction method is proposed that utilizes more neighboring luma samples compared to conventional CCCM prediction. By utilizing more neighboring luma samples, the coding efficiency of the CCCM prediction method according to the present disclosure can be improved.

[0283] According to an embodiment of the present disclosure, a prediction sample of the current chrominance sample 1120 may be generated based on representative neighboring luma samples N_f, W_f, S_f, and E_f. Referring to Formula 13, the representative neighboring luma samples may include the top representative neighboring luma sample N_f, the bottom representative neighboring luma sample S_f, the left representative neighboring luma sample W_f, and the right representative neighboring luma sample E_f of the same-position luma sample.

[0284] [Formula 13]

[0285] -N_f=(2*N+NW+NE+2)>>2

[0286] -w_f=(2*W+NW+SW+2)>>2

[0287] -S_f=(2*S+SW+SE+2)>>2

[0288] -E_f=(2*E+NE+SE+2)>>2

[0289] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0290] -predChromaVal=c0C+c1N_f+c2W_f+c3S_f+c4E_f+c5P+c6B

[0291] -pedChromaVal = c0C + c1N_f + c2W_f + c3S_f + c4E_f + c5B (without nonlinear terms)

[0292] Here, the top representative neighboring luma sample N_f may be an average value (or a weighted average value) of at least one neighboring luma sample N, NW, NE adjacent to the top of the co-located luma sample 1140. The bottom representative neighboring luma sample S_f may be an average value (or a weighted average value) of at least one neighboring luma sample S, SW, SE adjacent to the bottom of the co-located luma sample 1140. The left representative neighboring luma sample W_f may be an average value (or a weighted average value) of at least one neighboring luma sample W, SW, NW adjacent to the left side of the co-located luma sample 1140. The right representative neighboring luma sample E_f may be an average value (or a weighted average value) of at least one neighboring luma sample E, NE, SE adjacent to the right side of the co-located luma sample 1140.

[0293] The bias term B and the nonlinear term P according to the present disclosure may be the same as the bias term B and the nonlinear term P described in Embodiment 1. According to Formula 13, a 7-tap filter may be used to generate a prediction sample of the current chroma sample 1120. Alternatively, by removing the nonlinear term P, a 6-tap filter may be used to generate a prediction sample of the current chroma sample 1120.

[0294] According to another embodiment of the present disclosure, a prediction sample of the current chrominance sample 1120 may be generated based on a representative neighboring luma sample. Referring to Formula 14, the representative neighboring luma sample may include a horizontal representative neighboring luma sample C_hor, a vertical representative neighboring luma sample C_ver, a diagonal representative neighboring luma sample C_dia, and an anti-diagonal representative neighboring luma sample C_vdia of the same-position luma sample.

[0295] [Formula 14]

[0296] -C_hor=(W+E+1)>>2

[0297] -C_ver=(N+S+1)>>2

[0298] -C_dia=(NW+SE+1)>>2

[0299] -C_vdia=(SW+NE+1)>>2

[0300] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0301] -predChromaVal=c0C+c1C_hor+c2C_ver+c3C_dia+c4C_vdia+c5P+c6B

[0302] -predChromaVal=c0C+c1C_hor+c2C_ver+c3C_dia+c4C_vdia+c5B (without nonlinear term)

[0303] Here, the horizontal representative neighboring brightness sample C_hor may be the average value (or weighted average value) of at least one neighboring brightness sample W, E horizontally adjacent to the co-located brightness sample 1140. That is, the horizontal representative neighboring brightness sample C_hor may be the average value (or weighted average value) of at least one neighboring brightness sample among the left neighboring brightness sample W or the right neighboring brightness sample E of the co-located brightness sample 1140. The vertical representative neighboring brightness sample C_ver may be the average value (or weighted average value) of at least one neighboring brightness sample N, S vertically adjacent to the co-located brightness sample 1140. That is, the vertical representative neighboring brightness sample C_ver may be the average value (or weighted average value) of at least one neighboring brightness sample among the top neighboring brightness sample N or the bottom neighboring brightness sample S of the co-located brightness sample 1140. The diagonal representative neighboring brightness sample C_dia may be the average value (or weighted average value) of at least one neighboring brightness sample NW, SE diagonally adjacent to the co-located brightness sample 1140. That is, the diagonal representative neighboring luminance sample C_dia may be an average value (or weighted average value) of at least one neighboring luminance sample among the upper left neighboring luminance sample NW or the lower right neighboring luminance sample SE of the co-located luminance sample 1140. The anti-diagonal representative neighboring luminance sample C_vdia may be an average value (or weighted average value) of at least one neighboring luminance sample NE, SW diagonally adjacent to the co-located luminance sample 1140. That is, the anti-diagonal representative neighboring luminance sample (C_vdia) may be an average value (or weighted average value) of at least one neighboring luminance sample among the upper right neighboring luminance sample NE or the lower left neighboring luminance sample SW of the co-located luminance sample 1140.

[0304] The bias term B and the nonlinear term P according to the present disclosure may be the same as the bias term B and the nonlinear term P described in Embodiment 1. According to Formula 13, a 7-tap filter may be used to generate a prediction sample of the current chroma sample 1120. Alternatively, by removing the nonlinear term P, a 6-tap filter may be used to generate a prediction sample of the current chroma sample 1120.

[0305] According to an embodiment of the present disclosure, the chrominance sample prediction accuracy can be improved by considering all eight neighboring luma samples adjacent to the co-located luma sample 1140. The number of neighboring luma samples used in an embodiment of the present disclosure is not limited to 8. According to the present disclosure, for example, more neighboring luma samples than the number of conventionally used neighboring luma samples (i.e., four) can be used.

[0306] The determination of neighboring luma samples or the derivation of representative neighboring luma samples according to the present disclosure may be performed based on side information signaled through a bitstream. Here, the side information may be a mode flag or an index, etc.

[0307] Implementation 3

[0308] The CCCM prediction method according to one embodiment of the present disclosure may apply different CCCM coefficients to the chrominance Cb block and the chrominance Cr block. Fig.13 is a diagram illustrating a chrominance block and a luminance block for CCCM prediction according to an embodiment of the present disclosure. Fig.13 The following formula 15 is described.

[0309] According to one embodiment of the present disclosure, prediction of Cb samples 1340 in the current chroma Cb block 1330 and prediction of Cr samples 1360 in the current chroma Cr block 1350 may be performed independently. That is, CCCM coefficients applied to Cb samples 1340 and Cr samples 1360 may be derived separately as in Equation 15.

[0310] [Formula 15]

[0311] -P=(C*C+midVal)>>bitDepth(if bitDepth=10,P=(C*C+512)>>10)

[0312] -predChromaVal_cb=c0C+c1N+c2S+c3E+c4W+c5P+c6B

[0313] -predChromaVal_cr=c a C+c b N+c c S+c d E+c e W+c f P+c g B

[0314] The nonlinear term P and the bias term B of Formula 15 may be the same as the nonlinear term P and the bias term B described in the above embodiment 1. predChromaVal_cb of Formula 15 may mean the sample value of the Cb sample 1340 predicted by CCCM prediction. In addition, predChromaVal_cr may mean the sample value of the Cr sample 1360 predicted by CCCM prediction. c0 to c6 of Formula 15 may be CCCM coefficients for deriving the predicted value predChromaVal_cb of the Cb sample 1340. c0 of Formula 15 may be CCCM coefficients for deriving the predicted value predChromaVal_cb of the Cb sample 1340. a to c g It can be the CCCM coefficient used to derive the predicted value predChromaVal_cr of the Cr sample 1360.

[0315] According to an embodiment of the present disclosure, CCCM coefficients c0 to c6 for the chrominance Cb block 1330 may be calculated using luma reference samples and Cb reference samples. In addition, CCCM coefficients c0 to c6 for the chrominance Cb block 1330 may be calculated using luma reference samples and Cr reference samples. a to c g Here, the Cb reference sample may be a neighboring sample of the Cb sample 1340 , and the Cr reference sample may be a neighboring sample of the Cr sample 1360 .

[0316] According to another embodiment of the present disclosure, when predicting the Cr sample 1360 in the chroma Cr block 1350, the Cb sample 1340 in the chroma Cb block 1330 and the neighboring samples n, s, w, e, nw, ne, sw, and se of the Cb sample may be used. Referring to Equation 16, the sample value of the Cr sample 1360 may be calculated using the sample value of the Cb sample 1340 and the sample values ​​of its neighboring samples. In this case, the CCCM coefficient used to predict the Cb sample 1340 and the CCCM coefficient used to predict the Cr sample 1360 may be different from each other.

[0317] [Formula 16]

[0318] -P=(C*C++midVal)>>bitDepth(if birDepth=10,P=(C*C+512)>>10)

[0319] -predChromaVal_cb=c0C+c1N+c2S+c3E+c4W+c5P+c6B

[0320] -predChromaVal_cr=c a cb+c b n+c c S+c d e+c e W+c f P+c g B

[0321] According to another embodiment of the present disclosure, the method proposed in the present embodiment can be applied to various color spaces (e.g., RGB). Specifically, for the color plane performing the second encoding (decoding), CCCM prediction can be performed by referring to the first color plane that has completed the encoding (decoding). For the color plane performing the third encoding (decoding), CCCM prediction can be performed by referring to the first color plane or the second color plane that has completed the encoding (decoding). For example, in the case of the RGB color plane, since the encoding (decoding) is performed in the order of GBR, the G color plane can be used to perform CCCM prediction during the B color plane encoding (decoding). In addition, the G color plane or the B color plane can be used to perform CCCM prediction during the R color plane encoding (decoding).

[0322] The method proposed in Embodiment 3 may be used in combination with the method in Embodiment 1 or Embodiment 2. For example, as shown in Equation 17, the average value C_neighbor of neighboring luminance samples may be used to perform prediction of Cb samples and Cr samples.

[0323] [Formula 17]

[0324] -C_neighbor=(W+N+S+E+2)>>2

[0325] - p = (C * C + midVal) > > bitDepth (if bitDepth = 10, P = (C * C + 512)) > > 10)

[0326] -predChromaVal_cb=c0C+c1C_neighbor+c2p+c3B

[0327] -predChromaVal_cr=c a C+c b C_neighbor+c c P+c d B

[0328] According to an embodiment of the present disclosure, CCCM encoding performance may be improved by independently performing Cb sample prediction and Cr sample prediction.

[0329] The determination of neighboring luma samples or the derivation of representative neighboring luma samples according to the present disclosure may be performed based on side information signaled through a bitstream. Here, the side information may be a mode flag or an index, etc.

[0330] Implementation 4

[0331] A multi-model may be used to perform CCCM prediction according to an embodiment of the present disclosure. Specifically, the present disclosure may use two or more sets of CCCM coefficients to perform CCCM prediction. That is, similar to the existing MMLM (Multi-Model Linear Mode), the luma samples may be divided into two categories, and different CCCM coefficients may be applied to the two categories of luma samples, respectively. In this case, six reference sample lines may be used to perform CCCM calculations. In the following, reference will be made to Fig.14 Give a detailed description.

[0332] Fig.14 is a flow chart of a CCCM coefficient derivation method according to one embodiment of the present disclosure. Fig.14 The CCCM coefficient derivation method can correspond to Figure 4 Step S410. In addition, Fig.14 The derivation method of CCCM coefficients can correspond to Figure 6 Steps S610 to S630. Fig.14 , the image decoding device 200 may determine a reference sample area (S1410). Thereafter, the image decoding device 200 may determine a CCCM model (S1420). Specifically, the image decoding device 200 may determine one CCCM model among two or more CCCM models based on at least one reference sample in the reference sample area. For example, the determination of the CCCM model may be performed by comparing the average value of at least one reference sample in the reference sample area with a predetermined threshold. As another example, the determination of the CCCM model may be performed by comparing the average value of at least one reference sample in the reference sample area with a sample value of a co-located luminance sample.

[0333] The image decoding device 200 can derive CCCM coefficients (S1430). Specifically, the image decoding device 200 can derive CCCM coefficients for the determined CCCM model. At this time, the CCCM coefficients can be derived according to an embodiment of CCCM prediction based on the present disclosure. For example, when CCCM prediction is performed based on the following formula 18, the derivation of CCCM coefficients for corresponding CCCM prediction can also be performed based on the following formula 18. At this time, reference chroma samples in a reference area adjacent to the current chroma block, co-located reference luminance samples corresponding to the reference chroma samples as samples in a reference area adjacent to the luminance block corresponding to the chroma block, and / or adjacent reference luminance samples adjacent to the co-located reference luminance samples can be used. Hereinafter, this will be described with reference to the following formula 18.

[0334] [Formula 18]

[0335] - p = (C * C + midVal) > > bitDepth (if bitDepth = 10, P = (C * C + 512) > > 10)

[0336] -predChromaVal=if C_avg>=threshold? c0C+c1N+c2S+c3E+c4W+c5P+c6Belse,c a C+c b M+c c S+c d E+c e W+c f P+c g B

[0337] The nonlinear term P and the bias term B of Formula 18 may be the same as the nonlinear term P and the bias term B described in Embodiment 1 above. C_avg of Formula 18 may mean the average value of the sample values ​​of the luma samples present in the reference sample region for calculating the CCCM coefficients. Referring to Formula 18, when C_avg is greater than or equal to a predetermined threshold, CCCM coefficients c0 to c6 may be used to perform prediction for the current chroma sample. On the other hand, when C_avg is less than a predetermined threshold, CCCM coefficients c0 to c6 may be used. a to c g to perform prediction for the current chroma sample.

[0338] As another example, if the co-located luma sample value of the current chroma sample to be predicted is greater than or equal to C_avg, CCCM coefficients c0 to c6 may be used to perform prediction for the current chroma sample. On the other hand, if the co-located luma sample value of the current chroma sample to be predicted is less than C_avg, CCCM coefficients c0 to c6 may be used. a to c g to perform prediction for the current chroma sample.

[0339] Although various embodiments according to the present disclosure have been described as being performed in the image decoding apparatus 200 , it is apparent to those skilled in the art that corresponding or identical operations may also be performed in the image encoding apparatus 100 .

[0340] The CCCM prediction method according to an embodiment of the present disclosure can improve encoding performance by performing CCCM prediction by dividing into two models.

[0341] According to another embodiment of the present disclosure, the reference sample area for calculating the CCCM coefficients can be partially used. For example, in MDLM (mode-dependent linear mode), only the top reference sample area or the left reference sample area of ​​the current chrominance block and the current luminance block can be used to calculate the CCCM coefficients. Here, the MDLM mode may mean a CCLM mode that supports the LM_A mode for deriving linear model parameters based on the top neighboring samples and the LM_L mode for deriving linear model parameters based on the left neighboring samples. This will be referred to below. Fig.15 and Fig.16 Give a description.

[0342] Fig.15 is a diagram illustrating a reference sample area according to one embodiment of the present disclosure. Fig.16 is a flow chart of a CCCM coefficient derivation method according to one embodiment of the present disclosure. Fig.16 The derivation method of CCCM coefficients can correspond to Figure 4 Step S410. In addition, Fig.16 The derivation method of CCCM coefficients can correspond to Figure 6 Steps S610 to S630. Fig.16 , the image decoding device 200 may determine a reference sample area (S1610). Thereafter, the image decoding device 200 may derive CCCM coefficients (S1620). Specifically, the image decoding device 200 may derive CCCM coefficients using at least one reference sample in the reference sample area. At this time, the reference sample area may be determined based on information about the CCCM mode. Here, the CCCM mode may include one of a CCCM_A mode or a CCCM_L mode. The information about the CCCM mode may be a mode flag or index signaled via a bitstream.

[0343] The CCCM_A mode may be a mode for calculating CCCM coefficients using only the area 1510 adjacent to the top of the current luma block and the current chroma block. The CCCM_L mode may be a mode for calculating CCCM coefficients using only the area 1520 adjacent to the left of the current luma block and the current chroma block.

[0344] According to another embodiment of the present disclosure, the image decoding device 200 can calculate the CCCM coefficients by using all areas adjacent to the top and left sides of the current luminance block and the current chrominance block. That is, the image decoding device 200 can calculate the CCCM coefficients by using at least one reference sample present in an area adjacent to the top or left sides of the current luminance block and the current chrominance block.

[0345] In the method according to an embodiment of the present disclosure, the reference sample area can use the CTU boundary as a boundary to limit the number of reference lines. Specifically, the number of reference samples or the number of reference lines can be limited so that the number of reference samples is a power of 2 to N (e.g., 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096).

[0346] Although various embodiments according to the present disclosure have been described as being performed in the image decoding apparatus 200 , it is apparent to those skilled in the art that corresponding or identical operations may also be performed in the image encoding apparatus 100 .

[0347] The CCCM prediction method according to the embodiment of the present disclosure can improve the coding performance by adaptively performing CCCM prediction according to the CCCM mode. That is, the CCCM prediction method according to the embodiment of the present disclosure can perform CCCM prediction by dividing the reference area for CCCM prediction into two areas according to the CCCM mode, thereby improving the coding performance.

[0348] The determination of neighboring luma samples or the derivation of representative neighboring luma samples according to the present disclosure may be performed based on side information signaled through a bitstream. Here, the side information may be a mode flag or an index, etc.

[0349] Embodiments according to the present disclosure have been described with respect to CCCM prediction or derivation of CCCM coefficients. However, it is obvious to those skilled in the art that CCCM prediction and derivation of CCCM coefficients required for CCCM prediction can be performed by the same method. However, the derivation of CCCM coefficients can be performed using samples in a reference area adjacent to the current chrominance block and samples in a reference area adjacent to the co-located luminance block. In addition, CCCM prediction can be performed using co-located luminance samples and adjacent luminance samples in the luminance block corresponding to the current chrominance block.

[0350] Although for the sake of clarity of description, the exemplary method of the present disclosure described above is represented as a series of operations, it is not intended to limit the order of executing the steps, and these steps can be performed simultaneously or in different orders when necessary. In order to implement the method according to the present disclosure, the steps described may further include other steps, may include the remaining steps except some steps, or may include other additional steps except some steps.

[0351] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) may perform an operation (step) of confirming an execution condition or situation of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is met, the image encoding device or the image decoding device may perform the predetermined operation after determining whether the predetermined condition is met.

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

[0353] Various embodiments of the present disclosure may be implemented in hardware, firmware, software or a combination thereof. In the case of implementing the present disclosure in hardware, the present disclosure may be implemented in an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a general purpose processor, a controller, a microcontroller, a microprocessor, etc.

[0354] In addition, the image decoding device and the image encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcast sending and receiving device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an OTT video (over the top video) device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, a medical video device, etc., and may be used to process a video signal or a data signal. For example, an OTT video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.

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

[0356] like Fig.17 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.

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

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

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

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

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

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

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

[0364] Industrial Applicability

[0365] 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 comprising the following steps: The intra prediction mode based on the current chroma block is the convolution cross-component model CCCM mode to derive the CCCM coefficients; Determine a co-located luma sample in a co-located luma block corresponding to a current chroma sample in the current chroma block and neighboring luma samples of the co-located luma sample; deriving at least one representative neighboring brightness sample based on the neighboring brightness samples; as well as A prediction sample of the current chrominance sample is generated based on the representative neighboring luma samples and the CCCM coefficients.

2. The image decoding method according to claim 1, wherein: The neighboring luma samples include at least one of a left neighboring luma sample, a right neighboring luma sample, a top neighboring luma sample, a bottom neighboring luma sample, an upper left neighboring luma sample, an upper right neighboring luma sample, a lower left neighboring luma sample, or a lower right neighboring luma sample of the co-located luma sample.

3. The image decoding method according to claim 1, wherein: The representative neighboring brightness samples are derived based on an average of the neighboring brightness samples.

4. The image decoding method according to claim 1, wherein: The representative neighboring luma samples are derived by downsampling using the co-located luma samples and the neighboring luma samples.

5. The image decoding method according to claim 1, wherein: The step of determining the neighboring luma samples or the step of deriving the representative neighboring luma samples is performed based on side information signaled via a bitstream.

6. The image decoding method according to claim 1, in, The representative neighboring brightness samples include a top representative neighboring brightness sample, a bottom representative neighboring brightness sample, a left representative neighboring brightness sample, and a right representative neighboring brightness sample of the co-located brightness sample, wherein the top representative neighboring brightness sample is derived based on at least one neighboring brightness sample adjacent to the top of the co-located brightness sample, wherein the bottom adjacent brightness sample is derived based on at least one adjacent brightness sample adjacent to the bottom of the co-located brightness sample, wherein the left representative neighboring brightness sample is derived based on at least one neighboring brightness sample adjacent to the left side of the co-located brightness sample, and The right representative adjacent brightness sample is derived based on at least one adjacent brightness sample adjacent to the right side of the co-located brightness sample.

7. The image decoding method according to claim 1, in, The representative neighboring brightness samples include horizontal representative neighboring brightness samples, vertical representative neighboring brightness samples, diagonal representative neighboring brightness samples and anti-diagonal representative neighboring brightness samples. wherein the horizontal representative adjacent brightness sample is derived based on at least one adjacent brightness sample horizontally adjacent to the co-located brightness sample, wherein the vertical representative adjacent brightness sample is derived based on at least one adjacent brightness sample vertically adjacent to the co-located brightness sample, wherein the diagonal representative adjacent luma sample is derived based on at least one adjacent luma sample diagonally adjacent to the co-located luma sample, and The anti-diagonal representative neighboring brightness sample is derived based on at least one neighboring brightness sample that is anti-diagonally adjacent to the co-located brightness sample.

8. The image decoding method according to claim 1, in, The current chroma block includes a first chroma block and a second chroma block, and The CCCM coefficients for the first chrominance block are derived independently from the CCCM coefficients for the second chrominance block.

9. The image decoding method according to claim 1, in, The current chroma block includes a first chroma block and a second chroma block, wherein the CCCM prediction for the first chrominance block is performed based on the co-located luminance block, and The CCCM prediction for the second chroma block is performed based on the first chroma block.

10. The image decoding method according to claim 1, in, The steps of deriving the CCCM coefficients include: Identify reference sample areas; and deriving CCCM coefficients using at least one reference sample in the reference sample region, and The reference sample area is determined based on information about the CCCM mode.

11. The image decoding method according to claim 10, in, The CCCM mode includes a first mode and a second mode. The first mode is a mode that uses only the area adjacent to the co-located luminance block and the top of the current chrominance block as the reference sample area, and The second mode is a mode that uses only the area adjacent to the left side of the co-located luminance block and the current chrominance block as the reference sample area.

12. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: The intra prediction mode based on the current chroma block is the convolution cross-component model CCCM mode to derive the CCCM coefficients; Determine a co-located luma sample in a co-located luma block corresponding to a current chroma sample in the current chroma block and neighboring luma samples of the co-located luma sample; deriving at least one representative neighboring brightness sample based on the neighboring brightness samples; as well as A prediction sample of the current chrominance sample is generated based on the representative neighboring luma samples and the CCCM coefficients.

13. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising the following steps: The intra prediction mode based on the current chroma block is the convolution cross-component model CCCM mode to derive the CCCM coefficients; Determine a co-located luma sample in a co-located luma block corresponding to a current chroma sample in the current chroma block and neighboring luma samples of the co-located luma sample; deriving at least one representative neighboring luma sample based on the neighboring luma samples; as well as A prediction sample of the current chrominance sample is generated based on the representative neighboring luma samples and the CCCM coefficients.