Image encoding / decoding method and device for signaling chroma component prediction information according to whether palette mode is applicable, and method for transmitting bitstream

JP2024119967A5Active Publication Date: 2025-06-20LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024095876
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-07-21
Filing Date
2024-06-13
Publication Date
2025-06-20
Estimated Expiration
2040-07-21

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality images leads to a significant increase in transmission and storage costs due to the higher amount of information required, necessitating more efficient image compression techniques.

Method used

An image encoding/decoding method that signals chroma component prediction information based on whether a palette mode is applied, optimizing encoding/decoding efficiency by using palette mode encoding information and chroma component prediction information accordingly.

Benefits of technology

Improves encoding/decoding efficiency by effectively managing chroma component prediction, reducing transmission and storage costs while maintaining image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide image encoding / decoding methods and devices for signaling chroma component prediction information according to whether a palette mode is applicable.SOLUTION: An image decoding method performed by an image decoding device includes the steps of: determining a current block by splitting an image; identifying whether a palette mode is applied for the current block based on a palette mode flag obtained from a bitstream; obtaining palette mode encoding information of the current block from the bitstream based on a tree type of the current block and whether the palette mode is applied for the current block; and obtaining chroma component prediction information of the current block from the bitstream, when the palette mode is not applied for the current block.SELECTED DRAWING: Figure 25
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 more particularly to an image encoding / decoding method and apparatus that signal chroma component prediction information depending on whether a palette mode is applied, and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits transmitted leads to an increase in transmission costs and storage costs.

[0003] This requires a highly efficient image compression technique for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]

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

[0005] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that improves encoding / decoding efficiency by signaling chroma component prediction information depending on whether or not the palette mode is applied.

[0006] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0007] Another object of the present disclosure is to provide a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0008] Another object of the present disclosure is to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.

[0009] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the following description. [Means for solving the problem]

[0010] An image decoding method performed by an image decoding device according to one aspect of the present disclosure may include a step of dividing an image to determine a current block; a step of identifying whether a palette mode is applied to the current block based on a palette mode flag obtained from a bitstream; a step of obtaining palette mode encoding information for the current block from the bitstream based on a tree type of the current block and whether a palette mode is applied to the current block; and a step of obtaining chroma component prediction information of the current block from the bitstream if palette mode is not applied to the current block.

[0011] In addition, an image decoding device according to one aspect of the present disclosure includes a memory and at least one processor, wherein the at least one processor divides an image to determine a current block, identifies whether a palette mode is applied to the current block based on a palette mode flag obtained from a bitstream, obtains palette mode encoding information for the current block from the bitstream based on a tree type of the current block and whether a palette mode is applied to the current block, and if palette mode is not applied to the current block, obtains chroma component prediction information of the current block from the bitstream.

[0012] In addition, an image encoding method performed by an image encoding device according to one aspect of the present disclosure may include the steps of dividing an image to determine a current block, determining a prediction mode of the current block, encoding a palette mode flag indicating whether the prediction mode of the current block is palette mode or not based on whether the prediction mode of the current block is palette mode or not, encoding palette mode encoding information in which the current block is encoded in palette mode based on a tree type of the current block and whether the prediction mode of the current block is palette mode or not, and if the prediction mode of the current block is not palette mode, encoding chroma component prediction information of the current block.

[0013] Furthermore, a transmission method according to an aspect of the present disclosure can transmit a bitstream generated by the image encoding device or image encoding method of the present disclosure.

[0014] Furthermore, a computer-readable recording medium according to an aspect of the present disclosure can store a bitstream generated by the image encoding method or image encoding device of the present disclosure.

[0015] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention

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

[0017] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus can be provided that can improve encoding / decoding efficiency by signaling chroma component prediction information depending on whether or not the palette mode is applied.

[0018] According to the present disclosure, there can also be provided a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0019] According to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.

[0020] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.

[0021] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]

[0022] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2] 1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4]FIG. 2 is a diagram showing an image division structure according to an embodiment. [Diagram 5] FIG. 11 is a diagram showing an example of a block division type according to a multi-type tree structure. [Figure 6] FIG. 1 illustrates an example signaling mechanism for block partition information in a quadtree with nested multi-type tree structure according to the present disclosure. [Figure 7] FIG. 1 illustrates an embodiment in which a CTU is divided into multiple CUs. [Figure 8] FIG. 13 is a diagram showing an example of a redundant division pattern. [Figure 9] A diagram showing syntax for chroma format signaling according to one embodiment. [Figure 10] FIG. 2 is a diagram showing a chroma format classification table according to one embodiment. [Figure 11] FIG. 2 illustrates horizontal and vertical scanning according to one embodiment. [Figure 12] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 13] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 14] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 15] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 16] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 17] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 18] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 19] FIG. 13 illustrates a syntax for palette mode according to one embodiment. [Figure 20]FIG. 13 illustrates a formula for determining PredictorPaletteEntries and CurrentPaletteEntries according to one embodiment. [Figure 21] FIG. 13 illustrates a modified coding unit syntax according to one embodiment. [Figure 22] 1 is a flow chart illustrating a method for signaling predetermined chroma intra prediction information according to one embodiment. [Figure 23] 11 is a flowchart illustrating a method in which a decoding device according to an embodiment obtains chroma prediction information. [Figure 24] 1 is a flowchart illustrating a method for encoding an image by an encoding device according to an embodiment. [Diagram 25] 1 is a flowchart illustrating a method for a decoding device according to an embodiment to decode an image. [Figure 26] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0023] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.

[0024] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.

[0025] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not mean that the other component is excluded, but that the other component can be further included, unless otherwise specified.

[0026] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.

[0027] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.

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

[0029] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have ordinary meanings in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.

[0030] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).

[0031] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may be a "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.

[0032] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0033] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."

[0034] In addition, in this disclosure, a "current block" may mean a "luma block of a current block" unless a chroma block is explicitly stated. A "chroma block of a current block" may be expressed by explicitly including an explicit statement of a chroma block, such as a "chroma block" or a "current chroma block."

[0035] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."

[0036] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively."

[0037] Video Coding System Overview

[0038] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.

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

[0040] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.

[0041] The video source generating unit 11 can obtain the video / images through a process of capturing, synthesizing, or generating the video / images. The video source generating unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate the video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which the associated data is generated.

[0042] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.

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

[0044] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.

[0045] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.

[0046] Overview of the image encoding device

[0047] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.

[0048] As shown in Fig. 2, the image coding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy coding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.

[0049] All or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.

[0050] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, and a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0051] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy encoding unit 190. The information related to prediction may be encoded by the entropy encoding unit 190 and output in a bitstream format.

[0052] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block according to an intra prediction mode and / or an intra prediction technique. The intra prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a Planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.

[0053] The inter prediction unit 180 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of a block, a sub-block, or a sample based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block 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 from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 180 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 180 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of a neighboring block as a motion vector predictor and encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.

[0054] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.

[0055] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.

[0056] The transform unit 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-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.

[0057] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.

[0058] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., values ​​of syntax elements, etc.) together or separately in addition to the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a network abstraction layer (NAL) unit unit in a bitstream format. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements referred to in this disclosure may be encoded through the above-mentioned encoding procedures and included in the bitstream.

[0059] The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.

[0060] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.

[0061] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.

[0062] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.

[0063] 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 through this, the image encoding device 100 may avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and may also improve encoding efficiency.

[0064] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.

[0065] Overview of the image decoding device

[0066] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.

[0067] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.

[0068] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.

[0069] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of FIG. 1. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be obtained by dividing a coding tree unit or a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).

[0070] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets such as an adaptation 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 further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values ​​entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.

[0071] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.

[0072] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on a coefficient scan order performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

[0073] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0074] The prediction unit may perform prediction on a current block and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).

[0075] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.

[0076] 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 may be similarly applied to the intra prediction unit 265.

[0077] The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further 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. For example, the inter prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques), and the prediction information may include information indicating a mode (technique) of inter prediction for the current block.

[0078] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for a current block to be processed, such as when a skip mode is applied, the predicted block may be used as a reconstructed block. The description of the adder 155 may be similarly applied to the adder 235. The adder 235 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of a next current block to be processed in a current picture, and may also be used for inter prediction of a next picture after filtering as described below.

[0079] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may 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, an adaptive loop filter, a bilateral filter, etc.

[0080] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260. The memory 250 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 250 may store a reconstructed sample of a reconstructed block in the current picture and transmit it to the intra prediction unit 265.

[0081] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.

[0082] Image Segmentation Overview

[0083] The video / image coding method according to the present disclosure may be performed based on the following image partition structure. Specifically, procedures such as prediction, residual processing ((inverse) transform, (inverse) quantization, etc.), syntax element coding, filtering, etc., described below, may be performed based on CTU, CU (and / or TU, PU) derived based on the image partition structure. An image may be partitioned in units of blocks, and the block partition procedure may be performed in the image partition unit 110 of the encoding device described above. Partition-related information may be coded by the entropy coding unit 190 and transmitted to the decoding device in the form of a bitstream. The entropy decoding unit 210 of the decoding device may derive a block partition structure of a current picture based on the partition-related information obtained from the bitstream, and perform a series of procedures for image decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) based on the block partition structure.

[0084] A picture may be partitioned into a sequence of coding tree units (CTUs). FIG. 4 shows an example of a picture being partitioned into CTUs. A CTU may correspond to a coding tree block (CTB). Alternatively, a CTU may include a coding tree block of luma samples and two coding tree blocks of corresponding chroma samples. For example, for a picture containing three sample arrays, a CTU may include an N×N block of luma samples and two corresponding blocks of chroma samples.

[0085] Overview of CTU division

[0086] As mentioned above, a coding unit can be obtained by recursively splitting a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, a CTU can be first split into a quad-tree structure. Then, the leaf nodes of the quad-tree structure can be further split according to a multi-type tree structure.

[0087] Partitioning by a quadtree means dividing a current CU (or CTU) into four equal parts. By partitioning by a quadtree, the current CU can be divided into four CUs having the same width and height. If the current CU is not further divided into a quadtree structure, the current CU corresponds to a leaf node of the quadtree structure. The CU corresponding to the leaf node of the quadtree structure is not further divided and can be used as the above-mentioned final coding unit. Alternatively, the CU corresponding to the leaf node of the quadtree structure can be further divided by a multi-type tree structure.

[0088] 5 is a diagram showing the types of division of a block by a multi-type tree structure. Division by a multi-type tree structure can include two divisions by a binary tree structure and two divisions by a ternary tree structure.

[0089] The two divisions according to the binary tree structure may include vertical binary splitting (SPLIT_BT_VER) and horizontal binary splitting (SPLIT_BT_HOR). Vertical binary splitting (SPLIT_BT_VER) refers to a division in which the current CU is divided into two equal parts vertically. As shown in FIG. 4, two CUs having the same height as the height of the current CU and half the width of the current CU may be generated by the vertical binary splitting. Horizontal binary splitting (SPLIT_BT_HOR) refers to a division in which the current CU is divided into two equal parts horizontally. As shown in FIG. 5, two CUs having the same width as the width of the current CU and half the height of the current CU may be generated by the horizontal binary splitting.

[0090] The two divisions according to the ternary tree structure may include vertical ternary splitting (SPLIT_TT_VER) and horizontal ternary splitting (SPLIT_TT_HOR). The vertical ternary splitting (SPLIT_TT_VER) divides the current CU vertically at a ratio of 1:2:1. As shown in FIG. 5, the vertical ternary splitting may generate two CUs having the same height as the current CU and a width 1 / 4 of the current CU, and a CU having the same height as the current CU and a width half the current CU. The horizontal ternary splitting (SPLIT_TT_HOR) divides the current CU horizontally at a ratio of 1:2:1. As shown in FIG. 4, the horizontal ternary splitting may generate two CUs having a height 1 / 4 of the current CU and a width equal to the current CU, and a CU having a height half the current CU and a width equal to the current CU.

[0091] FIG. 6 is a diagram illustrating a signaling mechanism of block partition information in a quadtree with nested multi-type tree structure according to the present disclosure.

[0092] Here, the CTU is treated as the root node of the quadtree, and the CTU is first split into a quadtree structure. Information (e.g., qt_split_flag) indicating whether or not to perform quadtree splitting for the current CU (CTU or quadtree node (QT_node)) can be signaled. For example, if qt_split_flag is a first value (e.g., "1"), the current CU can be split into a quadtree. Also, if qt_split_flag is a second value (e.g., "0"), the current CU is not split into a quadtree and becomes a leaf node (QT_leaf_node) of the quadtree. The leaf nodes of each quadtree can then be further split into a multitype tree structure. That is, the leaf node of the quadtree can become a node (MTT_node) of the multitype tree. In a multi-type tree structure, a first flag (e.g., mtt_split_cu_flag) may be signaled to indicate whether the current node is further split. If the node is further split (e.g., the first flag is 1), a second flag (e.g., mtt_split_cu_vertical_flag) may be signaled to indicate the splitting direction. For example, if the second flag is 1, the splitting direction may be vertical, and if the second flag is 0, the splitting direction may be horizontal. Then, a third flag (e.g., mtt_split_cu_binary_flag) may be signaled to indicate whether the splitting type is a binary splitting type or a ternary splitting type. For example, if the third flag is 1, the splitting type may be a binary splitting type, and if the third flag is 0, the splitting type may be a ternary splitting type. The nodes of the multitype tree obtained by binary or ternary partitioning can be further partitioned into a multitype tree structure, but the nodes of the multitype tree cannot be partitioned into a quadtree structure.If the first flag is 0, the corresponding node of the multitype tree is not further divided and becomes a leaf node (MTT_leaf_node) of the multitype tree. The CU corresponding to the leaf node of the multitype tree can be used as the final coding unit described above.

[0093] Based on the above mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, a multi-type tree splitting mode (MttSplitMode) of a CU can be derived as shown in Table 1. In the following description, the multi-type tree splitting mode can be abbreviated as a multi-tree split type or a split type.

[0094] [Table 1]

[0095] FIG. 7 illustrates an example in which a CTU is divided into multiple CUs by applying a multi-type tree after applying a quadtree. In FIG. 7, a bold block edge 710 indicates a quadtree division, and the remaining edges 720 indicate a multi-type tree division. A CU may correspond to a coding block (CB). In one embodiment, a CU may include a coding block of a luma sample and two coding blocks of chroma samples corresponding to the luma sample. A chroma component (sample) CB or TB size may be derived based on a luma component (sample) CB or TB size according to a component ratio according to a color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of a picture / image. If the color format is 4:4:4, the chroma component CB / TB size may be set to be the same as the luma component CB / TB size. If the color format is 4:2:2, the width of the chroma components CB / TB can be set to half the width of the luma components CB / TB, and the height of the chroma components CB / TB can be set to the height of the luma components CB / TB. If the color format is 4:2:0, the width of the chroma components CB / TB can be set to half the width of the luma components CB / TB, and the height of the chroma components CB / TB can be set to half the height of the luma components CB / TB.

[0096] In one embodiment, when the size of the CTU is 128 based on the luma sample unit, the size of the CU can have a size from 128×128, which is the same size as the CTU, to 4×4. In one embodiment, in the case of a 4:2:0 color format (or chroma format), the chroma CB size can have a size from 64×64 to 2×2.

[0097] Meanwhile, in one embodiment, the CU size and the TU size may be the same, or multiple TUs may exist within a CU region. The TU size may generally refer to a luma component (sample) TB (Transform Block) size.

[0098] The TU size may be derived based on a maximum allowable TB size (maxTbSize) that is a preset value. For example, if the CU size is larger than the maxTbSize, multiple TUs (TBs) having the maxTbSize may be derived from the CU, and transform / inverse transform may be performed in units of the TUs (TBs). For example, the maximum allowable luma TB size may be 64×64, and the maximum allowable chroma TB size may be 32×32. If the width or height of a CB divided by the tree structure is larger than the maximum transform width or height, the CB may be automatically (or implicitly) divided until the horizontal and vertical TB size constraints are satisfied.

[0099] Also, for example, when intra prediction is applied, the intra prediction mode / type may be derived in units of the CU (or CB), and the procedure of deriving neighboring reference samples and generating predicted samples may be performed in units of TU (or TB). In this case, one or more TUs (or TBs) may exist within one CU (or CB) region, and in this case, the multiple TUs (or TBs) may share the same intra prediction mode / type.

[0100] Meanwhile, for a quadtree coding tree scheme with a multi-type tree, the following parameters can be signaled from the encoding device to the decoding device as SPS syntax elements. For example, at least one of CTUsize, a parameter indicating the size of a root node of a quadtree, MinQTSize, a parameter indicating the minimum allowable size of a leaf node of a quadtree, MaxBTSize, a parameter indicating the maximum allowable size of a root node of a binary tree, MaxTTSize, a parameter indicating the maximum allowable size of a root node of a ternary tree, MaxMttDepth, a parameter indicating the maximum allowed hierarchy depth of a multi-type tree split from a leaf node of a quadtree, MinBtSize, a parameter indicating the minimum allowable leaf node size of a binary tree, and MinTtSize, a parameter indicating the minimum allowable leaf node size of a ternary tree, can be signaled.

[0101] In one embodiment using 4:2:0 chroma format, the CTU size may be set to a 128x128 luma block and two 64x64 chroma blocks corresponding to the luma block. In this case, MinQTSize may be set to 16x16, MaxBtSize may be set to 128x128, MaxTtSzie may be set to 64x64, MinBtSize and MinTtSize may be set to 4x4, and MaxMttDepth may be set to 4. Quadtree partitioning may be applied to the CTU to generate leaf nodes of the quadtree. The leaf nodes of the quadtree may be referred to as leaf QT nodes. The leaf nodes of the quadtree may have a size from 16x16 (e.g., the MinQTSize) to 128x128 (e.g., the CTU size). If the leaf QT node is 128x128, it may not be further partitioned into a binary tree / ternary tree. This is because even if the partition is performed in this case, it will exceed MaxBtsize and MaxTtszie (e.g., 64×64). In other cases, the leaf QT node may be further partitioned into a multitype tree. Thus, the leaf QT node is a root node for the multitype tree, and the leaf QT node may have a multitype tree depth (mttDepth) value of 0. If the multitype tree depth reaches MaxMttdepth (e.g., 4), no further additional partitioning may be considered. If the width of the multitype tree node is equal to MinBtSize and equal to or less than 2×MinTtSize, no further additional horizontal partitioning may be considered. If the height of the multitype tree node is equal to MinBtSize and equal to or less than 2×MinTtSize, no further additional vertical partitioning may be considered. In this case, if partitioning is not considered, the encoding device may omit signaling of partition information. In such a case, the decoding device may induce the partition information to a predetermined value.

[0102] Meanwhile, one CTU may include a coding block of luma samples (hereinafter referred to as a "luma block") and two coding blocks of corresponding chroma samples (hereinafter referred to as "chroma blocks"). The above coding tree scheme may be applied to the luma blocks and chroma blocks of a current CU in the same manner, or may be applied separately. Specifically, the luma blocks and chroma blocks in one CTU may be divided into the same block tree structure, and the tree structure in this case may be represented as a single tree (SINGLE_TREE). Alternatively, the luma blocks and chroma blocks in one CTU may be divided into separate block tree structures, and the tree structure in this case may be represented as a dual tree (DUAL_TREE). In other words, when a CTU is divided into a dual tree, a block tree structure for the luma blocks and a block tree structure for the chroma blocks may exist separately. In this case, the block tree structure for the luma block may be called a dual tree luma (DUAL_TREE_LUMA), and the block tree structure for the chroma block may be called a dual tree chroma (DUAL_TREE_CHROMA). For P and B slice / tile groups, the luma block and the chroma block in one CTU may be restricted to have the same coding tree structure. However, for I slice / tile groups, the luma block and the chroma block may have separate block tree structures. If the separate block tree structure is applied, the luma coding tree block (CTB) may be divided into CUs based on a specific coding tree structure, and the chroma CTB may be divided into chroma CUs based on another coding tree structure. That is, it may mean that a CU in an I slice / tile group to which a separate block tree structure is applied may be composed of a coding block of a luma component or a coding block of two chroma components, and a CU in a P or B slice / tile group may be composed of blocks of three color components (a luma component and two chroma components).

[0103] Although the quadtree coding tree structure with the multi-type tree has been described above, the structure in which the CU is divided is not limited thereto. For example, the BT structure and the TT structure can be interpreted as concepts included in a multiple partitioning tree (MPT) structure, and the CU can be interpreted as being divided by the QT structure and the MPT structure. In an example in which the CU is divided by the QT structure and the MPT structure, a syntax element (e.g., MPT_split_type) including information on whether the leaf node of the QT structure is divided into several blocks and a syntax element (e.g., MPT_split_mode) including information on which direction the leaf node of the QT structure is divided in, vertically or horizontally, are signaled, so that the division structure can be determined.

[0104] In another example, the CUs may be divided in a manner different from that of the QT structure, the BT structure, or the TT structure, that is, unlike the QT structure in which the CUs of the lower depth are divided into 1 / 4 size of the CUs of the higher depth, or the BT structure in which the CUs of the lower depth are divided into 1 / 2 size of the CUs of the higher depth, or the TT structure in which the CUs of the lower depth are divided into 1 / 4 or 1 / 2 size of the CUs of the higher depth, the CUs of the lower depth may be divided into 1 / 5, 1 / 3, 3 / 8, 3 / 5, 2 / 3, or 5 / 8 size of the CUs of the higher depth, as the case may be, and the manner in which the CUs are divided is not limited thereto.

[0105] In this way, the quadtree coding block structure with the multi-type tree can provide a very flexible block partition structure. Meanwhile, due to the partition types supported by the multi-type tree, different partition patterns can potentially result in the same coding block structure in some cases. The encoding device and the decoding device can reduce the amount of data of partition information by limiting the occurrence of such redundant partition patterns.

[0106] For example, FIG. 8 exemplarily illustrates redundant partitioning patterns that may occur in binary tree partitioning and ternary tree partitioning. As shown in FIG. 8, the continuous binary partitioning 810 and 820 in one direction at the two-step level has the same coding block structure as the binary partitioning for the center partition after ternary partitioning. In such a case, binary tree partitioning for the center blocks 830 and 840 of the ternary tree partitioning can be prohibited. Such prohibition can be applied to the CUs of all pictures. If such a particular partitioning is prohibited, the signaling of the corresponding syntax element can be modified to reflect such a prohibited case, thereby reducing the number of bits signaled for the partitioning. For example, as in the example shown in FIG. 8, if binary tree partitioning for the center block of the CU is prohibited, the mtt_split_cu_binary_flag syntax element indicating whether the partitioning is binary partitioning or ternary partitioning is not signaled, and its value can be induced to 0 by the decoding device.

[0107] Chroma Format Overview

[0108] The following describes chroma format. An image can be encoded with encoding data including a luma component (e.g., Y) array and two chroma component (e.g., Cb, Cr) arrays. For example, one pixel of the encoded image can include a luma sample and a chroma sample. A chroma format can be used to indicate the configuration format of the luma sample and the chroma sample, and the chroma format is sometimes called a color format.

[0109] In one embodiment, the image can be encoded in various chroma formats, such as monochrome, 4:2:0, 4:2:2, 4:4:4, etc. In monochrome sampling, there can be one sample array, which can be a luma array. In 4:2:0 sampling, there can be one luma sample array and two chroma sample arrays, each of which can be half the height and half the width of the luma array. In 4:2:2 sampling, there can be one luma sample array and two chroma sample arrays, each of which can be the same height and half the width of the luma array. In 4:4:4 sampling, there can be one luma sample array and two chroma sample arrays, each of which can be the same height and width as the luma array.

[0110] For example, in the case of 4:2:0 sampling, the position of a chroma sample can be located at the bottom of the corresponding luma sample, in the case of 4:2:2 sampling, the chroma sample can be located overlapping the position of the corresponding luma sample, and in the case of 4:4:4 sampling, both the luma sample and the chroma sample can be located at overlapping positions.

[0111] The chroma format used in the encoding device and the decoding device may be predetermined. Alternatively, the chroma format may be signaled from the encoding device to the decoding device for adaptive use in the encoding device and the decoding device. In one embodiment, the chroma format may be signaled based on at least one of chroma_format_idc and separate_colour_plane_flag. At least one of chroma_format_idc and separate_colour_plane_flag may be signaled via a higher level syntax such as DPS, VPS, SPS or PPS. For example, chroma_format_idc and separate_colour_plane_flag may be included in the SPS syntax as shown in FIG. 9.

[0112] Meanwhile, FIG. 10 shows an example of chroma format classification using signaling of chroma_format_idc and separate_colour_plane_flag. chroma_format_idc may be information indicating a chroma format applied to an encoded image. separate_colour_plane_flag may indicate whether a color array is processed separately in a particular chroma format. For example, a first value (e.g., 0) of chroma_format_idc may indicate monochrome sampling. A second value (e.g., 1) of chroma_format_idc may indicate 4:2:0 sampling. A third value (e.g., 2) of chroma_format_idc may indicate 4:2:2 sampling. A fourth value (e.g., 3) of chroma_format_idc may indicate 4:4:4 sampling.

[0113] For 4:4:4 sampling, the following may apply depending on the value of separate_colour_plane_flag: If the value of separate_colour_plane_flag is a first value (e.g., 0), each of the two chroma arrays may have the same height and width as the luma array. In this case, the value of ChromaArrayType, which indicates the type of chroma sample array, may be set to the same as chroma_format_idc. If the value of separate_colour_plane_flag is a second value (e.g., 1), the luma, Cb, and Cr sample arrays may be processed separately, thereby being processed similarly to a monochrome sampled picture. In this case, ChromaArrayType may be set to 0.

[0114] Intra prediction for chroma blocks

[0115] When intra prediction is performed on a current block, prediction can be performed on a luma component block (luma block) and a chroma component block (chroma block) of the current block, in which case the intra prediction mode for the chroma block can be set separately from the intra prediction mode for the luma block.

[0116] For example, an intra prediction mode for a chroma block may be indicated based on 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 any one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a cross-component linear model (CCLM) mode. Here, the planar mode may indicate the 0th intra prediction mode, the DC mode may indicate the 1st intra prediction mode, the vertical mode may indicate the 26th intra prediction mode, and the horizontal mode may indicate the 10th intra prediction mode. DM may also be referred to as a direct mode. CCLM may also be referred to as a linear model (LM). The CCLM mode may include any one of L_CCLM, T_CCLM, and LT_CCLM.

[0117] Meanwhile, DM and CCLM are dependent intra prediction modes that predict a chroma block using information of a luma block. The DM may indicate a mode in which the same intra prediction mode as the intra prediction mode for the luma component is applied as the intra prediction mode for the chroma component. In addition, the CCLM may indicate an intra prediction mode in which a restored sample of a luma block is subsampled in the process of generating a prediction block for a chroma block, and a sample derived by applying CCLM parameters α and β to the subsampled sample is used as a prediction sample for the chroma block.

[0118] CCLM (Cross-component linear model) mode

[0119] As described above, the CCLM mode can be applied to a chroma block. The CCLM mode is an intra prediction mode using correlation between a luma block and a chroma block corresponding to the luma block, and is performed by deriving a linear model based on surrounding samples of the luma block and surrounding samples of the chroma block. Then, a predicted sample of the chroma block can be derived based on the derived linear model and a reconstructed sample of the luma block.

[0120] Specifically, when a CCLM mode is applied to a current chroma block, parameters for a linear model may be derived based on neighboring samples used for intra prediction of the current chroma block and neighboring samples used for intra prediction of the current luma block. For example, the linear model for CCLM may be expressed based on the following equation.

[0121]

number

[0122] Here, pred c (i,j) may indicate a predicted sample of the (i,j) coordinate of the current chroma block in the current CU. L (i,j) may indicate a reconstructed sample at the (i,j) coordinate of the current luma block in the CU. For example, rec L Let '(i,j) denote the down-sampled reconstructed sample of the current luma block. The linear model coefficients α and β can be signaled or derived from surrounding samples.

[0123] Palette Mode Overview

[0124] Hereinafter, the palette mode will be described. According to an embodiment, an encoding apparatus may encode an image using the palette mode, and a decoding apparatus may decode an image using the palette mode in a corresponding manner. The palette mode may be called a palette coding mode, an intra palette mode, an intra palette coding mode, or the like. The palette mode may be regarded as one type of intra coding mode, and may be regarded as one of the intra prediction methods. However, similar to the above-described skip mode, a separate residual value for the corresponding block may not be signaled.

[0125] In one embodiment, the palette mode can be used to improve coding efficiency when coding screen content, which is a computer-generated image that contains a significant amount of text and graphics. Typically, local regions of an image generated by screen content are separated by sharp edges and are represented by a small number of colors. To take advantage of this characteristic, the palette mode can represent samples for a block with an index that points to a color entry in a palette table.

[0126] To apply the palette mode, information for a palette table may be signaled. In one embodiment, the palette table may include index values ​​corresponding to each color. To signal the index values, palette index prediction information may be signaled. The palette index prediction information may include index values ​​for at least a portion of a palette index map. The palette index map may map pixels of the video data to color indices in the palette table.

[0127] The palette index prediction information may include run value information. For at least a portion of the palette index map, the run value information may be information relating a run value to an index value. A run value may be associated with an escape color index. The palette index map may be generated from the palette index prediction information. For example, at least a portion of the palette index map may be generated by determining whether to adjust an index value of the palette index prediction information based on a last index value.

[0128] A current block in a current picture may be coded or reconstructed according to a palette index map. When a palette mode is applied, pixel values ​​in a current coding unit may be represented by a small set of representative color values. Such a set may be named a palette. For pixels having values ​​close to the palette colors, a palette index may be signaled. For pixels having values ​​that do not belong to the palette (outliers), the pixel may be represented by an escape symbol and the quantized pixel value may be directly signaled. In this specification, a pixel or a pixel value may be described by a sample.

[0129] To decode a block coded in palette mode, a decoding device may decode palette colors and indices. The palette colors may be described as a palette table and coded using a palette table coding tool. An escape flag may be signaled for each coding unit. The escape flag may indicate whether an escape symbol is present in the current coding unit. If an escape symbol is present, the palette table may be incremented by one unit (e.g., index unit) and the last index may be designated as an escape mode. The palette indices of all pixels for one coding unit may constitute a palette index map and may be coded using a palette index map coding tool.

[0130] For example, to encode the palette table, a palette predictor can be maintained. The palette predictor can be initialized at each slice start. For example, the palette predictor can be reset to 0. For each entry of the palette predictor, a reuse flag can be signaled that indicates whether it is currently part of the palette or not. The reuse flag can be signaled using run-length coding of zero values.

[0131] Then, the numbers for the new palette entries can be signaled using a zeroth order exponential-Golomb code. Finally, the component values ​​for the new palette entries can be signaled. After encoding the current coding unit, the palette predictor can be updated with the current palette, and entries from the previous palette predictor that are not reused in the current palette can be appended to the end of the new palette predictor (until the maximum size allowed is reached), which can be called palette stuffing.

[0132] For example, to code a palette index map, the indices can be coded using horizontal or vertical scanning. The scan order can be signaled via the bitstream using a parameter palette_transpose_flag indicating the scan direction. For example, if a horizontal scan is applied to scan the indices for samples in the current coding unit, palette_transpose_flag can have a first value (e.g., 0), and if a vertical scan is applied, palette_transpose_flag can have a second value (e.g., 1). Figure 11 shows an example of horizontal scanning and vertical scanning according to one embodiment.

[0133] Also, in one embodiment, the palette index can be coded using the modes "INDEX" and "COPY_ABOVE", which can be signaled using one flag, except that the mode of palette index is signaled for the top row if horizontal scanning is used, the mode of palette index is signaled for the leftmost column if vertical scanning is used, and the previous mode is "COPY_ABOVE".

[0134] In "INDEX" mode, the palette index can be signaled explicitly. For "INDEX" and "COPY_ABOVE" modes, a run value indicating the number of encoded pixels can be signaled using the same mode.

[0135] The coding order for the index map can be set as follows: First, the number of index values ​​for a coding unit can be signaled. This can be done after signaling the actual index values ​​for the entire coding unit using truncated binary coding. Both the number of indexes and the index values ​​can be coded in bypass mode. This allows for grouping of bypass bins associated with an index. Then, the palette mode (INDEX or COPY_ABOVE) and run value can be signaled in an interleaved manner.

[0136] Finally, component escape values ​​corresponding to escape samples for the entire coding unit can be grouped together and coded in bypass mode. An additional syntax element last_run_type_flag can be signaled after signaling the index value. By using last_run_type_flag together with the number of indexes, it is possible to omit signaling the run value corresponding to the last run in the block.

[0137] In one embodiment, a dual tree type that performs independent coding unit partitioning for luma and chroma components can be used for I slices. Palette mode can be applied to luma and chroma components separately or together. If dual tree is not applied, palette mode can be applied to all of Y, Cb, and Cr components.

[0138] In one embodiment, signaling of syntax elements for palette mode may be coded and signaled as shown in Figures 12 to 19. Figures 12 and 13 show the successive syntax in a coding unit (CU) for palette mode, and Figures 14 to 19 show the successive syntax for palette mode.

[0139] Each syntax element will be described below. A palette mode flag, pred_mode_plt_flag, may indicate whether or not palette mode is applied to the current coding unit. For example, a first value (e.g., 0) of pred_mode_plt_flag may indicate that palette mode is not applied to the current coding unit. A second value (e.g., 1) of pred_mode_plt_flag may indicate that palette mode is applied to the current coding unit. If pred_mode_plt_flag is not obtained from the bitstream, the value of pred_mode_plt_flag may be determined to be the first value.

[0140] The parameter PredictorPaletteSize[startComp] may indicate the size of the predictor palette for startComp, which is the first color component in the current palette table.

[0141] The parameter PalettePredictorEntryReuseFlags[i] may be information indicating whether or not an entry is reused. For example, a first value (e.g., 0) of PalettePredictorEntryReuseFlags[i] may indicate that the i-th entry of the predictor palette is not an entry of the current palette, and a second value (e.g., 1) may indicate that the i-th entry of the predictor palette can be reused in the current palette. For use of PalettePredictorEntryReuseFlags[i], the initial value may be set to 0.

[0142] The parameter palette_predictor_run can indicate the number of zeros that exist before non-zero entries in the array PalettePredictorEntryReuseFlags.

[0143] The parameter num_signalled_palette_entries may indicate the number of entries in the current palette that are explicitly signaled for the first color component startComp of the current palette table. If num_signalled_palette_entries is not obtained from the bitstream, the value of num_signalled_palette_entries may be determined to be 0.

[0144] The parameter CurrentPaletteSize[startComp] indicates the size of the current palette for the first color component startComp of the current palette table. It can be calculated using the following formula. The value of CurrentPaletteSize[startComp] can range from 0 to palette_max_size.

[0145] [Number 2] CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries

[0146] The parameter new_palette_entries[cIdx][i] may indicate the value of the i-th palette entry to be signaled for color component cIdx.

[0147] The parameter PredictorPaletteEntries[cIdx][i] may indicate the i-th element in the predictor palette for color component cIdx.

[0148] The parameter CurrentPaletteEntries[cIdx][i] can indicate the i-th element in the current palette for the color component cIdx. PredictorPaletteEntries and CurrentPaletteEntries can be generated using the formula shown in FIG.

[0149] The parameter palette_escape_val_present_flag may indicate the presence or absence of an escape coded sample. For example, a first value (e.g., 0) of palette_escape_val_present_flag may indicate that no escape coded sample exists for the current coding unit, and a second value (e.g., 1) of palette_escape_val_present_flag may indicate that the current coding unit includes at least one escape coded sample. If palette_escape_val_present_flag is not obtained from the bitstream, the value of palette_escape_val_present_flag may be determined to be 1.

[0150] The parameter MaxPaletteIndex may indicate the maximum available value of the palette index for the current coding unit. The value of MaxPaletteIndex may be determined as CurrentPaletteSize[startComp]+palette_escape_val_present_flag.

[0151] The parameter num_palette_indices_minus1 may indicate the number of palette indices that are explicitly or implicitly signaled for the current block. For example, a value of num_palette_indices_minus1 plus 1 may indicate the number of palette indices that are explicitly or implicitly signaled for the current block. If num_palette_indices_minus1 is not included in the bitstream, the value of num_palette_indices_minus1 may be determined to be 0.

[0152] The parameter palette_idx_idc may be an indicator of an index into the palette table CurrentPaletteEntries. The value of palette_idx_idc may have a value from 0 to MaxPaletteIndex for the first index of the block, and a value from 0 to MaxPaletteIndex-1 for the remaining indexes of the block. If the value of palette_idx_idc is not obtained from the bitstream, the value of palette_idx_idc may be determined to be 0.

[0153] The parameter PaletteIndexIdc[i] may be an array that stores the value of the i-th palette_idx_idc that is explicitly or implicitly signaled. The values ​​of all elements of PaletteIndexIdc[i] may be initialized to 0.

[0154] The parameter copy_above_indices_for_final_run_flag may indicate information indicating whether to copy previous indices for the final run, where a first value (e.g., 0) may indicate that the palette index at the end position of the current coding unit is explicitly or implicitly signaled via the bitstream, and a second value (e.g., 1) may indicate that the palette index at the end position of the current coding unit is explicitly or implicitly signaled via the bitstream. If copy_above_indices_for_final_run_flag is not obtained from the bitstream, the value of copy_above_indices_for_final_run_flag may be determined to be 0.

[0155] The parameter palette_transpose_flag may be information indicating a scanning method used to scan indexes for pixels of the current coding unit. For example, a first value (e.g., 0) of palette_transpose_flag may indicate that a horizontal scan is applied to scan indexes for pixels of the current coding unit, and a second value (e.g., 1) of palette_transpose_flag may indicate that a vertical scan is applied to scan indexes for pixels of the current coding unit. If palette_transpose_flag is not obtained from the bitstream, the value of palette_transpose_flag may be determined to be 0.

[0156] A first value (e.g., 0) of the parameter copy_above_palette_indices_flag may indicate that an indicator of the palette index of the sample is obtained or derived from the coded value of the bitstream. A second value (e.g., 1) of the parameter copy_above_palette_indices_flag may indicate that the palette index is the same as the palette index of the surrounding sample. For example, the surrounding sample may be a sample located in the same position as the current sample in the left column of the current sample if vertical scanning is currently used. Or, the surrounding sample may be a sample located in the same position as the current sample in the upper row of the current sample if horizontal scanning is currently used.

[0157] A first value (e.g., 0) of the parameter CopyAboveIndicesFlag[xC][yC] may indicate that the palette index is obtained explicitly or implicitly from the bitstream. A second value (e.g., 1) may indicate that the palette index is generated by copying the palette index of the left column if the current vertical scan is used, or by copying the palette index of the upper row if the current horizontal scan is used. Here, xC and yC are coordinate indicators indicating the position of the current sample relatively from the top left sample of the current picture. The value of PaletteIndexMap[xC][yC] may have a value from 0 to (MaxPaletteIndex-1).

[0158] The parameters PaletteIndexMap[xC][yC] indicate a palette index, and may indicate, for example, an index into the array represented by CurrentPaletteEntries. The array indexes xC and yC are coordinate indicators indicating the coordinates of the current sample relative to the top-left sample of the current picture, as described above. PaletteIndexMap[xC][yC] may have values ​​from 0 to (MaxPaletteIndex-1).

[0159] The parameter PaletteRun may indicate the number of consecutive positions having the same palette index when the value of CopyAboveIndicesFlag[xC][yC] is 0. On the other hand, when the value of CopyAboveIndicesFlag[xC][yC] is 1, PaletteRun may indicate the number of consecutive positions having the same palette index as the palette index at a position in the top row when the current scan direction is horizontal scan, or the number of consecutive positions having the same palette index as the palette index at a position in the left column when the current scan direction is vertical scan.

[0160] The parameter PaletteMaxRun may indicate the maximum available value of PaletteRun. The value of PaletteMaxRun may be an integer greater than 0.

[0161] The parameter palette_run_prefix can indicate the prefix portion used in binarizing the PaletteRun.

[0162] The parameter palette_run_suffix may indicate the suffix portion used in the binarization of the PaletteRun. If palette_run_suffix is ​​not obtained from the bitstream, its value may be determined to be 0.

[0163] The value of PaletteRun can be determined as follows: For example, if the value of palette_run_prefix is ​​less than 2, it can be calculated as follows:

[0164] [Number 3] PaletteRun=palette_run_prefix

[0165] On the other hand, if the value of palette_run_prefix is ​​2 or greater, it can be calculated as follows:

[0166] [Number 4]

[0167] PrefixOffset=1<<(palette_run_prefix-1)

[0168] PaletteRun=PrefixOffset+palette_run_suffix

[0169] The parameter palette_escape_val may indicate the quantized escape coded sample value for the component. The parameter PaletteEscapeVal[cIdx][xC][yC] may indicate the escape value of the sample whose PaletteIndexMap[xC][yC] has a value of (MaxPaletteIndex-1) and whose palette_escape_val_present_flag has a value of 1, where cIdx may indicate a color component. The array indicators xC and yC may be position indicators representing the position of the current sample in terms of a relative distance from the top-left sample of the current picture, as described above.

[0170] Chroma prediction mode signaling when palette mode is applied

[0171] A method of signaling chroma prediction mode information when the palette mode is applied will be described below. In one embodiment, chroma prediction coding such as CCLM may not be applied to a coding unit (or coding block) to which the palette mode is applied. In addition, intra_chroma_pred_mode may not be signaled for a coding unit to which the palette mode is applied.

[0172] If it is determined that CCLM is available for a chroma component, an on / off flag for it may be signaled. In one embodiment, the availability of CCLM may be determined using sps_palette_enabled_flag or sps_plt_enabled_flag, and the on / off flag signaling of CCLM may be signaled using sps_palette_enabled_flag or sps_plt_enabled_flag.

[0173] Meanwhile, in the example of Fig. 13, the signaling of CCLM information (e.g., cclm_mode_flag) does not take into account whether the palette mode is applied to the coding unit. For example, the example of Fig. 13 describes an embodiment in which predetermined chroma prediction information (e.g., cclm_mode_flag, intra_chroma_pred_mode) is signaled when the palette mode is not applied to the current coding unit or the coding unit is not dual tree chroma.

[0174] In this case, signaling of predetermined chroma prediction information to a block that has been palette coded in a single tree structure may cause unnecessary syntax signaling. Furthermore, signaling of predetermined chroma prediction information in this manner may cause chroma intra prediction by CCLM or chroma intra prediction by DM mode to be performed even though the chroma components in the coding unit have been coded in palette mode.

[0175] In order to solve this problem, the syntax for a coding unit may be modified as shown in Figure 21. Figure 21 shows the syntax of a coding unit indicating that certain chromin intra prediction information 2120 is obtained from a bitstream when a value of pred_mode_plt_flag 2110, which is a parameter indicating whether or not palette mode is applied to the current coding unit, is a first value (e.g., 0) indicating that palette mode is not applied. Also, the syntax of Figure 21 indicates that certain chromin intra prediction information 2120 is not obtained from a bitstream when a value of pred_mode_plt_flag 2110 is a second value (e.g., 1) indicating that palette mode is applied.

[0176] As in the embodiment of Figure 21, certain chroma prediction information (e.g., cclm_mode_flag, intra_chroma_pred_mode) can be signaled depending on whether palette mode is applied to the current coding unit for which certain chroma prediction information (e.g., cclm_mode_flag, intra_chroma_pred_mode) is signaled.

[0177] Hereinafter, signaling of predetermined chrominance intra prediction information according to the syntax of FIG. 21 will be described with reference to FIG. 22. An encoding device or a decoding device according to an embodiment may determine whether a palette mode is applied to a current coding unit (e.g., a coding block) (S2210). For example, the decoding device may determine whether a palette mode is applied to a current coding unit according to a value of pred_mode_plt_flag.

[0178] Next, if the palette mode is applied to the current coding unit, the encoding device may encode the coding unit in the palette mode, and the decoding device may decode the coding unit in the palette mode. This allows the encoding device or the decoding device to not signal certain chroma prediction information (S2220). For example, the encoding device may not need to encode certain chroma prediction information (e.g., cclm_mode_flag, intra_chroma_pred_mode), and the decoding device may not need to obtain certain chroma prediction information from the bitstream.

[0179] Next, if the palette mode is not applied to the current coding unit, the encoding device or the decoding device may signal the predetermined chroma prediction information. In one embodiment, the encoding device or the decoding device may determine whether the CCLM mode is available for the current coding unit (S2230), and if available, may signal the CCLM parameter (S2240), or if not available, may signal the intra_chroma_pred_mode parameter (S2250).

[0180] In this regard, the step of the decoding device acquiring chroma prediction information will be described in more detail with reference to FIG. 23. When the palette mode is not applied to the current coding unit (S2310), the decoding device may determine whether the CCLM mode is available for the current coding unit (S2320). For example, the decoding device may determine that the CCLM mode is not available for the current coding unit if a parameter sps_cclm_enabled_flag indicating the availability of the CCLM mode signaled in the sequence parameter set has a first value (e.g., 0) indicating that the CCLM mode is not available. Alternatively, the decoding device may determine that the CCLM mode is available for the current coding unit if a slice type parameter sh_slice_type transmitted via a slice header indicates that the current slice type is not an I slice or the size of the luminance component of the current block is smaller than 64 when the sps_cclm_enabled_flag has a second value (e.g., 1) indicating that the cclm mode is available. Alternatively, the decoding device may determine that the CCLM mode is available for the current coding unit if the sps_cclm_enabled_flag has a second value (e.g., 1) indicating that the cclm mode is available, and if the sps_qtbtt_dual_tree_intra_flag parameter signaled in the sequence parameter set does not indicate that each CTU (coding tree unit) included in the I slice is partitioned into luma component blocks of size 64 x 64 and the development CTU becomes a header node of the dual tree.

[0181] If the CCLM mode is available, the decoding device may determine whether the CCLM mode is applied to the current coding unit (S2330). For example, the decoding device may obtain a cclm_mode_flag parameter from the bitstream. The parameter cclm_mode_flag may indicate whether the CCLM mode is applied. A first value (e.g., 0) of cclm_mode_flag may indicate that the CCLM mode is not applied. A second value (e.g., 1) of cclm_mode_flag may indicate that one of the CCLM modes T_CCLM, L_CCLM, and LT_CCLM may be applied. If the value of cclm_mode_flag is not obtained from the bitstream, the value of cclm_mode_flag may be determined to be 0.

[0182] When the CCLM mode is applied (e.g., cclm_mode_flag==1), the decoding device may obtain a parameter cclm_mode_idx from the bitstream (S2340). The parameter cclm_mode_idx may indicate an index indicating a CCLM mode to be used to decode the chroma components of the current coding unit, among T_CCLM, L_CCLM, and LT_CCLM.

[0183] On the other hand, if the CCLM mode is unavailable or not applicable (e.g., cclm_mode_flag==0), the decoding device may obtain the parameter intra_chroma_pred_mode from the bitstream (S2350). As described above, the parameter intra_chroma_pred_mode may indicate an intra prediction mode used to decode a chroma component of the current coding unit. As an example, the intra_chroma_pred_mode may indicate any one of a planar mode, a DC mode, a vertical mode, a horizontal mode, and a derived mode (DM).

[0184] Encoding method

[0185] Hereinafter, a method for encoding by an encoding device according to an embodiment using the above-mentioned method will be described with reference to Fig. 24. The encoding device according to an embodiment includes a memory and at least one processor, and the at least one processor can perform the following encoding method.

[0186] First, the encoding device may divide an image to determine a current block (S2410). For example, the encoding device may divide an image to determine a current block as described above with reference to Figures 4 to 6. In the division process according to one embodiment, image division information may be encoded, and the encoded image division information may be generated as a bitstream.

[0187] Next, the encoding device may determine a prediction mode of the current block (S2420). Next, the encoding device may encode a palette mode flag (e.g., pred_mode_plt_flag) indicating whether the prediction mode of the current block is the palette mode based on whether the prediction mode of the current block is the palette mode (S2430). The encoded palette mode flag may be generated as a bitstream.

[0188] Next, the encoding device may encode palette mode encoding information obtained by encoding the current block in palette mode based on the tree type of the current block and whether the prediction mode of the current block is palette mode (S2440). For example, if it is determined that the palette mode is applied, the encoding device may generate a bitstream by generating palette mode encoding information using a palette_coding() syntax as described with reference to Figures 14 to 19.

[0189] Meanwhile, the step of encoding palette mode encoding information for the current block may include the step of encoding palette mode encoding information for a luma component of the current block. For example, when a tree type of the current block is a single tree type or a dual tree luma type and a palette mode is applied to the current block, information for palette mode prediction for the luma component of the current block may be encoded, and a bitstream may be generated using the encoded information.

[0190] In this case, the palette mode coding information for the luma component of the current block may be coded based on the size of the luma component block of the current block. For example, as in the embodiment of FIG 13, the coding apparatus may generate the palette mode coding information as a bitstream according to the palette_coding() syntax defined based on the width (e.g., cbWidth) and height (e.g., cbHeight) of the luma component block of the current block.

[0191] In addition, the step of encoding palette mode encoding information for the current block may further include encoding palette mode encoding information for chroma components of the current block. For example, when a palette mode is applied to the current block and a tree type of the current block is a dual tree chroma type, information for palette mode prediction for chroma components of the current block may be encoded, and a bitstream may be generated using the encoded information.

[0192] In this case, the palette mode coding information for the chroma components of the current block may be coded based on the size of the chroma component blocks of the current block. For example, as in the embodiment of FIG. 13, the coding apparatus may generate the palette mode coding information as a bitstream according to the palette_coding() syntax defined based on the width (e.g., cbWidth / subWidthC) of the chroma component blocks of the current block and the height (e.g., cbHeight / subHeightC) of the chroma component blocks of the current block. Here, subWidthC and subHeightC may be the ratio of the height and width of the chroma component blocks with respect to the luma component block. In one embodiment, subWidthC and subHeightC may be determined based on chroma_format_idc and separate_cour_plane_flag as shown in FIG. 10.

[0193] Next, if the prediction mode of the current block is not the palette mode, the encoding apparatus may encode chroma component prediction information of the current block (S2450). The chroma component prediction information may be information for CCLM (Cross-component linear model) prediction (e.g., cclm_mode_flag, cclm_mode_idx) or chroma component intra prediction information (e.g., intra_chroma_pred_mode).

[0194] Meanwhile, if the palette mode is applied to the current block, the encoding apparatus may not encode the chroma component prediction information.

[0195] More specifically, the information for CCLM prediction may include a CCLM flag (e.g., cclm_mode_flag) indicating whether CCLM prediction is performed and a CCLM mode index (e.g., cclm_mode_idx) indicating a mode of CCLM prediction. The CCLM flag may be encoded and generated as the bitstream if CCLM prediction is available for the current block. The CCLM mode index may be encoded and generated as the bitstream if the CCLM flag indicates that CCLM prediction is performed.

[0196] On the other hand, if the CCLM flag indicates that the CCLM prediction is not performed, the chroma component intra prediction information (eg, intra_chroma_pred_mode) may be encoded and generated as the bitstream.

[0197] Decryption method

[0198] Hereinafter, a method for performing decoding by a decoding device according to an embodiment using the above-mentioned method will be described with reference to Fig. 25. The decoding device according to an embodiment includes a memory and at least one processor, and the at least one processor can perform the following decoding method.

[0199] First, the decoding apparatus may divide an image to determine a current block (S2510). For example, the decoding apparatus may divide an image to determine a current block as described above with reference to Figures 4 to 6. In the division process according to an embodiment, image division information obtained from a bitstream may be used.

[0200] Next, the decoding apparatus can determine whether the palette mode is applied to the current block based on a palette mode flag (eg, pred_mode_plt_flag) obtained from the bitstream (S2520).

[0201] Next, the decoding apparatus may obtain palette mode coding information for the current block from the bitstream based on the tree type of the current block and whether the palette mode is applied to the current block (S2530). For example, if it is determined that the palette mode is applied, the decoding apparatus may obtain palette mode coding information from the bitstream using the palette_coding() syntax as described with reference to Figures 14 to 19.

[0202] Meanwhile, obtaining palette mode coding information for the current block may include obtaining palette mode coding information for a luma component of the current block. For example, when a tree type of the current block is a single tree type or a dual tree luma type and a palette mode is applied to the current block, information for palette mode prediction for the luma component of the current block may be obtained from a bitstream.

[0203] In this case, the palette mode coding information for the luma component of the current block may be obtained based on the size of the luma component block of the current block. For example, as in the embodiment of FIG 13, the palette_coding() syntax may be performed based on the width (e.g., cbWidth) and the height (e.g., cbHeight) of the luma component block of the current block.

[0204] Meanwhile, the step of obtaining palette mode encoding information for the current block may further include obtaining palette mode encoding information for chroma components of the current block. For example, when a palette mode is applied to the current block and a tree type of the current block is a dual tree chroma type, information for palette mode prediction for chroma components of the current block may be obtained from the bitstream.

[0205] In this case, the palette mode coding information for the chroma components of the current block may be obtained based on the size of the chroma component blocks of the current block. For example, as in the embodiment of FIG. 13, the palette_coding() syntax may be performed based on the width of the chroma component blocks of the current block (e.g., cbWidth / subWidthC) and the height of the chroma component blocks of the current block (e.g., cbHeight / subHeightC). subWidthC and subHeightC may be the ratios of the height and width of the chroma component blocks with respect to the luma component block. In one embodiment, subWidthC and subHeightC may be determined based on chroma_format_idc and separate_cour_plane_flag as shown in FIG. 10.

[0206] Next, the decoding apparatus may obtain chroma component prediction information of the current block from the bitstream if palette mode is not applied to the current block (S2540). For example, if palette mode is not applied, the decoding apparatus may obtain CCLM prediction information (e.g., cclm_mode_flag, cclm_mode_idx) or chroma component intra prediction information (e.g., intra_chroma_pred_mode) from the bitstream as described with reference to FIG. 23. On the other hand, if palette mode is applied to the current block, the decoding apparatus may not obtain the chroma component prediction information from the bitstream.

[0207] More specifically, the information for CCLM prediction may include a CCLM flag (e.g., cclm_mode_flag) indicating whether CCLM prediction is performed and a CCLM mode index (e.g., cclm_mode_idx) indicating a mode of CCLM prediction. The CCLM flag may be obtained from the bitstream if CCLM prediction is available for the current block. The CCLM mode index may be obtained from the bitstream if the CCLM flag indicates that CCLM prediction is performed.

[0208] On the other hand, if the CCLM flag indicates that the CCLM prediction is not performed, the chroma component intra-prediction information (eg, intra_chroma_pred_mode) may be obtained from the bitstream.

[0209] Application examples

[0210] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To realize the method according to the present disclosure, the steps illustrated may include other steps, some steps may be omitted and the remaining steps may be omitted, or some steps may be omitted and additional steps may be included.

[0211] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions or circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied or not.

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

[0213] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, software, or a combination thereof, etc. In the case of a hardware implementation, the implementation may be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.

[0214] 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 transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.

[0215] FIG. 26 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.

[0216] As shown in FIG. 26, a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a Web server, a media storage, a user device, and a multimedia input device.

[0217] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, video camera, etc. directly generates a bitstream, the encoding server can be omitted.

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

[0219] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit the multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server can control commands / responses between devices in the content streaming system.

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

[0221] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.

[0222] Each server in the content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.

[0223] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of the various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]

[0224] The embodiments of the present disclosure can be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding device, comprising: Segmenting the image to determine a current block; identifying whether a palette mode is applied to the current block based on a palette mode flag obtained from the bitstream; obtaining palette mode coding information of the current block from the bitstream based on a tree type of the current block and whether the palette mode is applied to the current block; determining whether the palette mode is applied to the current block based on the tree type of the current block being not a dual tree chroma type or the palette mode not being applied to the current block; and obtaining chrominance prediction information of the current block from the bitstream based on the fact that the palette mode is not applied to the current block; The image decoding method, wherein the chroma component prediction information is information for a cross-component linear model (CCLM) prediction or chroma component intra-prediction information.

2. The image decoding method of claim 1 , wherein the chroma component prediction information is not obtained from the bitstream based on the palette mode being applied to the current block.

3. The image decoding method of claim 1, wherein information for palette mode prediction of the luma component of the current block is obtained from the bitstream based on the tree type of the current block being a single tree type or a dual tree luma type and the palette mode being applied to the current block.

4. The image decoding method of claim 3 , wherein the step of obtaining the palette mode encoding information of the luma component of the current block is performed based on a size of a luma component block of the current block.

5. The image decoding method of claim 1, wherein information for palette mode prediction of chroma components of the current block is obtained from the bitstream based on the palette mode being applied to the current block and the tree type of the current block being a dual tree chroma type.

6. The image decoding method of claim 5 , wherein the step of obtaining the palette mode encoding information of the chroma components of the current block is performed based on a size of a chroma component block of the current block.

7. The information for CCLM prediction includes a CCLM flag indicating whether CCLM prediction is performed, and a CCLM mode index indicating a mode of CCLM prediction, the CCLM flag is obtained from the bitstream based on the availability of CCLM prediction for the current block; The image decoding method according to claim 1 , wherein the CCLM mode index is obtained from the bitstream based on the CCLM flag indicating that the CCLM prediction is performed.

8. The image decoding method of claim 7, wherein the chroma component intra prediction information is obtained from the bitstream based on the CCLM flag indicating that the CCLM prediction is not performed.

9. An image coding method performed by an image coding device, comprising: Segmenting the image to determine a current block; determining a prediction mode of the current block; encoding a palette mode flag indicating whether the prediction mode of the current block is the palette mode based on whether the prediction mode of the current block is the palette mode; encoding palette mode encoding information indicating that the current block is encoded in a palette mode based on a tree type of the current block and whether the prediction mode of the current block is the palette mode; determining whether the palette mode is applied to the current block based on the tree type of the current block being not a dual tree chroma type or the palette mode not being applied to the current block; encoding chrominance component prediction information of the current block based on the prediction mode of the current block being not the palette mode; The image coding method, wherein the chroma component prediction information is information for a cross-component linear model (CCLM) prediction or chroma component intra-prediction information.

10. The image encoding method of claim 9 , wherein the chroma component prediction information is not encoded based on the palette mode being applied to the current block.

11. Palette mode encoding information in which a chroma component of the current block is encoded in the palette mode based on the palette mode being applied to the current block and the tree type of the current block being a dual tree chroma type is encoded; The image encoding method of claim 9 , wherein information for a cross-component linear model (CCLM) prediction or chroma component intra-prediction information is encoded as the chroma component prediction information based on the fact that the palette mode is not applied to the current block.

12. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: The image encoding method includes: Segmenting the image to determine a current block; determining a prediction mode of the current block; encoding palette mode encoding information indicating that the current block is encoded in the palette mode based on a tree type of the current block and whether the prediction mode of the current block is a palette mode; determining whether the palette mode is applied to the current block based on the tree type of the current block being not a dual tree chroma type or the palette mode not being applied to the current block; generating the bitstream by encoding at least one of a palette mode flag indicating whether the prediction mode of the current block is a palette mode and chroma component prediction information of the current block; The chroma component prediction information is encoded based on the prediction mode of the current block being not the palette mode; The method, wherein the chroma component prediction information is information for a cross-component linear model (CCLM) prediction or chroma component intra prediction information.