Image encoding / decoding method and device using palette mode, and bitstream transmission method
The image encoding/decoding method enhances efficiency by using a palette mode with a partitioning structure-based predictor, addressing the cost and storage challenges of high-resolution images.
Patent Information
- Application Number
- JP2023172537
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-23
- Filing Date
- 2023-10-04
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-09-23
AI Technical Summary
The increasing demand for high-resolution, high-quality images has led to a surge in transmission and storage costs due to the increased amount of information, necessitating highly efficient image compression techniques.
An image encoding/decoding method and apparatus that utilizes a palette mode with a selectively updated palette predictor based on the partitioning structure of a current block, enhancing encoding/decoding efficiency.
Improves encoding/decoding efficiency by optimizing the use of palette mode, allowing for more effective transmission and storage of high-resolution images.
Smart Images

Figure 0007549104000005 
Figure 0007549104000006 
Figure 0007549104000007
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image encoding / decoding method and apparatus using a palette mode, and a bitstream transmission method, and more particularly, to an image encoding / decoding method and apparatus that selectively update a palette predictor based on a partition structure of a current block, and a bitstream transmission method 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 device using palette mode.
[0006] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for selectively updating a palette predictor based on a partition structure of a current block.
[0007] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that selectively applies a palette mode based on the division structure of a current block.
[0008] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image coding method or apparatus according to the present disclosure.
[0009] 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.
[0010] 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.
[0011] 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]
[0012] According to an aspect of the present disclosure, an image decoding method includes: obtaining palette information and a palette index for a current block from a bitstream when a palette mode is applied to the current block; obtaining palette prediction information; constructing a palette predictor and a palette table for the current block based on the palette information; generating a palette index map for the current block based on the palette index prediction information; and decoding the current block based on the palette table and the palette index map, wherein the palette predictor can be selectively updated based on a partition structure of the current block.
[0013] According to another aspect of the present disclosure, an image decoding device includes a memory and at least one processor, where when a palette mode is applied to a current block, the at least one processor obtains palette information and palette index prediction information for the current block from a bitstream, constructs a palette predictor and a palette table for the current block based on the palette information, generates a palette index map for the current block based on the palette index prediction information, and decodes the current block based on the palette table and the palette index map, and the palette predictor can be selectively updated based on a partition structure of the current block.
[0014] According to another aspect of the present disclosure, an image encoding method includes, when a palette mode is applied to a current block, constructing a palette predictor and a palette table for the current block, generating a palette index map for the current block based on the palette table, and encoding the current block based on the palette index map, wherein the palette predictor can be selectively updated based on a partition structure of the current block.
[0015] Furthermore, a transmission method according to another aspect of the present disclosure can transmit a bitstream generated by the image encoding device or image encoding method of the present disclosure.
[0016] Furthermore, a computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by the image encoding method or image encoding device of the present disclosure.
[0017] 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
[0018] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0019] Furthermore, according to the present disclosure, an improved palette mode based image encoding / decoding method and apparatus can be provided.
[0020] In addition, the present disclosure provides an image encoding / decoding method and apparatus that selectively applies a palette mode based on a partition structure of a current block.
[0021] According to the present disclosure, a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure can also be provided.
[0022] 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.
[0023] In addition, according to the present disclosure, 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 can be provided. .
[0024] 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]
[0025] [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] FIG. 2 is a diagram showing an example of luma blocks and chroma blocks in a 4:2:0 color format. [Figures 10a-10c] FIG. 13 is a diagram illustrating an example of syntax for switching a single tree structure to a dual tree structure. [Figure 11] 1 is a flowchart illustrating a video / image coding method based on intra-prediction. [Figure 12] FIG. 13 is a diagram illustrating an example configuration of an intra prediction unit according to the present disclosure. [Figure 13] 1 is a flowchart illustrating a video / image decoding method based on intra prediction. [Figure 14] FIG. 13 is a diagram illustrating an example configuration of an intra prediction unit according to the present disclosure. [Figure 15] FIG. 13 is a diagram showing an example of a scanning method that can be used in the palette mode. [Figure 16] FIG. 2 illustrates an example of a palette encoding process for a current block. [Figure 17] A diagram showing a portion of the coding_unit syntax for palette mode. [Fig. 18a-18e] A diagram showing the pallett_coding syntax for palette mode. [Figure 19] FIG. 1 is a diagram showing an example of a CTU having a local dual tree structure. [Figure 20] FIG. 20 is a diagram showing an example of a decoding process for each CU in the example of FIG. 19. [Figure 21-22] FIG. 21 is a diagram for explaining a problem that occurs when applying the palette mode in the decoding process of FIG. 20. [Diagram 23] 1 is a flowchart illustrating a palette encoding method according to one embodiment of the present disclosure. [Figure 24] FIG. 20 is a diagram for explaining the palette encoding process in the example of FIG. 19 when the palette predictor is not updated. [Diagram 25] 13A and 13B are diagrams illustrating an example of a process for selectively updating a palette predictor based on a partition structure of a current block. [Figure 26] 1 is a flowchart illustrating a palette decoding method according to one embodiment of the present disclosure. [Figure 27] 1 is a flowchart illustrating a palette encoding method according to one embodiment of the present disclosure. [Figure 28] A figure showing a specific example of a coding_unit syntax including a palette mode flag. [Figure 29] 1 is a flowchart illustrating a palette decoding method according to one embodiment of the present disclosure. [Diagram 30] FIG. 1 is a diagram illustrating an example of a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have their ordinary meaning in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.
[0033] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, and a slice / tile is a coding unit constituting a part of a picture, and one picture can be composed of one or more slices / tiles. In addition, a slice / tile can be composed of one or more CTUs (coding unit units). It can contain a tree unit.
[0034] 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.
[0035] 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.
[0036] 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."
[0037] Furthermore, in this disclosure, unless there is an explicit reference to a chroma block, a "current block" may refer to a block including both a luma component block and a chroma component block, or a "luma block of the current block." The luma component block of the current block may be expressed by explicitly including the reference to a luma component block, such as a "luma block" or a "current luma block." Furthermore, the chroma component block of the current block may be expressed by explicitly including the reference to a chroma component block, such as a "chroma block" or a "current chroma block."
[0038] 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."
[0039] 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."
[0040] Video Coding System Overview
[0041] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.
[0042] The video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 encodes encoded video and / or images. The image information or data may be communicated to the decoding device 20 in file or streaming format via a digital storage medium or a network.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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 in a file or streaming format via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray (registered trademark: the same applies below), HDD, SSD, etc. The transmitting unit 13 may include an element for generating a media file through 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.
[0047] 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.
[0048] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.
[0049] Overview of the image encoding device
[0050] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.
[0051] As shown in FIG. 2 , the image encoding device 100 includes 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 181, and a multiplication unit 182. The residual processing unit may further include a subtraction unit 115. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transform unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transform unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0052] 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. The data may include a digital buffer and may be implemented by a digital storage medium.
[0053] 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.
[0054] 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.
[0055] 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 far away, depending on the intra prediction mode and / or intra prediction technique. The intra prediction mode may include a number of non-directional modes and a number of directional modes. The non-directional modes may include, for example, a DC mode and a Planar mode. The directional modes may be selected according to the degree of fineness of the prediction direction. For example, 33 directional prediction modes or 65 directional prediction modes may be included. However, this is merely an example, and more or less directional prediction modes may be used based on settings. The intra prediction unit 185 may also determine a prediction mode to be applied to a current block using prediction modes applied to neighboring blocks.
[0056] The inter prediction unit 180 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, 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 correlation between the motion information of 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 are spatial neighboring blocks (spatial neighboring blocks) existing in the current picture. The inter prediction unit 180 may include a neighboring block 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), or the like. 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 the 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 the 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.
[0057] 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.
[0058] 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.
[0059] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may be a discrete cosine transform (DCT), a discrete cosine transform (DST), or a discrete time division multiplex (STM) transform. The transform process may include at least one of the following: Sine Transform, Karhunen-Loeve Transform (KLT), Graph-Based Transform (GBT), or Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented as a graph. 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.
[0060] 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.
[0061] 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.
[0062] The bitstream can be transmitted over a network or stored in a digital storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include a USB, SD, CD, DVD, Blu-ray, etc. The entropy encoding unit 190 may include various storage media such as a hard disk, a hard disk drive, a hard disk drive (HDD), a hard disk drive (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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] Overview of the image decoding device
[0069] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.
[0070] 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.
[0071] 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.
[0072] 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).
[0073] 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. Among the information decoded by the image decoding unit 200, 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.
[0074] 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.
[0075] 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.
[0076] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0077] 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).
[0078] 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.
[0079] 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.
[0080] The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation between motion information of 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 construct 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 received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques). An inter prediction mode (technique) may be determined for the current block, and the information regarding the prediction may include information indicating a mode (technique) of inter prediction for the current block.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] Image Segmentation Overview
[0086] 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.
[0087] 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.
[0088] Overview of CTU division
[0089] 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.
[0090] 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.
[0091] 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.
[0092] The two partitions by the binary tree structure are called vertical binary partitions. The splitting may include horizontal binary splitting (SPLIT_BT_VER) and horizontal binary splitting (SPLIT_BT_HOR). Vertical binary splitting (SPLIT_BT_VER) refers to splitting the current CU into two equal parts vertically. As shown in FIG. 5, 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 splitting the current CU 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.
[0093] The two divisions based on the ternary tree structure may include vertical ternary splitting (SPLIT_TT_VER) and horizontal ternary splitting (SPLIT_TT_HOR). 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 can generate two CUs each 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. 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 can generate two CUs each having the same height as the current CU and a width 1 / 4 of the current CU. Two CUs having a height of 1 / 4 the height of the current CU and a width the same as the width of the current CU, and one CU having a height of half the height of the current CU and a width the same as the width of the current CU can be generated.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] [Table 1] JPEG0007549104000002.jpg13169
[0098] 7 shows an example of a CTU being split into multiple CUs by applying a multi-type tree after applying a quadtree. In FIG. 7, a bold block edge 710 indicates a quadtree split, and the remaining edges 720 indicate a multi-type tree split. The CU may correspond to a coding block (CB). In one embodiment, the CU may include a coding block of luma samples and two coding blocks of chroma samples corresponding to the luma samples.
[0099] The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB or TB size according to the component ratio according to the color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of the 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 component CB / TB may be set to half the width of the luma component CB / TB, and the height of the chroma component CB / TB may be set to the height of the luma component CB / TB. If the color format is 4:2:0, the width of the chroma component CB / TB may be set to half the width of the luma component CB / TB, and the height of the chroma component CB / TB may be set to half the height of the luma component CB / TB.
[0100] 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.
[0101] 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.
[0102] The TU size may be derived based on a maximum allowable TB size (maxTbSize), which 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 transformation / inverse transformation 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 in the horizontal and vertical directions. It can be divided until the TB size limit is met.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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 block and the chroma block of the current CU in the same manner or separately. Specifically, within one CTU, The luma blocks and chroma blocks in one CTU may be divided into the same block tree structure, and in this case, the tree structure may be referred to 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 in this case, the tree structure may be referred to as a dual tree (DUAL_TREE). That is, 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 blocks may be referred to as a dual tree luma (DUAL_TREE_LUMA), and the block tree structure for the chroma blocks may be referred to as a dual tree chroma (DUAL_TREE_CHROMA). For P and B slices / tile groups, the luma blocks and chroma blocks in one CTU may be restricted to have the same coding tree structure. However, for an I slice / tile group, the luma blocks and chroma blocks may have separate block tree structures from each other. If a separate block tree structure is applied, a luma CTB (Coding Tree Block) may be divided into CUs based on a specific coding tree structure, and a 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).
[0107] 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.
[0108] 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.
[0109] 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.
[0110] For example, Fig. 8 shows an example of a redundant partition pattern that may occur in binary tree partitioning and ternary tree partitioning. As shown in Fig. 8, the successive binary partitions 810 and 820 for one direction of the two-step level are the same as the binary partition for the center partition after the ternary partitioning. The coding block structure. In such a case, binary tree partitioning for the center blocks 830, 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 prohibition, 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 a binary partition or a ternary partition is not signaled, and its value can be induced to 0 by the decoding device.
[0111] Chroma Format Overview
[0112] A source or coded picture / image may include a luma component (Y) block and two chroma component (cb,cr) blocks. That is, one pixel of a picture / image may include a luma sample and two chroma samples (cb,cr). A chroma format may indicate a configuration format of the luma sample and the chroma sample (cb,cr) and may also be called a color format. A chroma format may be predefined or may be adaptively signaled. For example, the chroma format may be signaled based on at least one of chroma_format_idc and separate_colour_plane_flag as shown in Table 2. 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.
[0113] [Table 2]
[0114] Referring to Table 2, chroma_format_idc may indicate the format of the luma sample and the corresponding chroma sample, and separate_colour_plane_flag may indicate whether the three color components (Y, Cb, Cr) are coded separately in the 4:4:4 chroma format.
[0115] If chroma_format_idc is 0, the chroma format corresponds to a monochrome format, and the current block may contain only a luma component block, not a chroma component block.
[0116] Alternatively, if chroma_format_idc is 1, the chroma format corresponds to a 4:2:0 chroma format, and the width and height of the chroma component block may correspond to half the width and height of the luma component block, respectively.
[0117] Or, if chroma_format_idc is 2, the chroma format corresponds to a 4:2:2 chroma format, the width of the chroma component block corresponds to half the width of the luma component block, and the height of the chroma component block may be the same as the height of the luma component block.
[0118] Or, if chroma_format_idc is 3, the chroma format corresponds to a 4:4:4 chroma format, and the width and height of a chroma component block may be the same as the width and height of a luma component block, respectively.
[0119] SubWidthC and SubHeightC may indicate the ratio of luma samples to chroma samples. For example, if the width and height of a luma component block are CbWidth and CbHeight, respectively, the width and height of a chroma component block may be derived as (CbWidth / SubwidthC) and (CbHeight / SubHeightC), respectively.
[0120] Chroma block minimum size limit
[0121] In the image encoding / decoding process, the size of a chroma block can have a large effect on throughput. For example, if chroma blocks smaller than a certain size are generated excessively, the throughput of the image encoding / decoding process may be significantly reduced. To solve this problem, CU partitioning may be restricted so that chroma blocks smaller than a certain size are not generated.
[0122] The image encoding / decoding apparatus may set a minimum size of a chroma block. In one example, a chroma block may be restricted to include at least 16 chroma samples. For example, division of a luma block or a chroma block may be restricted so that a 2×2, 2×4, or 4×2 chroma block is not generated. As a result, in the dual tree structure, quad-tree division and / or binary division for a 2×8, 4×4, or 8×2 chroma block may be restricted. Also, in the dual tree structure, ternary division for a 2×8, 2×16, 4×4, 4×8, 8×2, or 8×4 chroma block may be restricted.
[0123] Specifically, if any of the following conditions 1-1 to 1-4 is satisfied, the quadtree division for the current block may be restricted.
[0124] (Condition 1-1) If the partitioning structure of the current block is single-tree or dual-tree luma, and the size of the luma block is equal to or smaller than the minimum size that can be partitioned by quadtree partitioning.
[0125] (Condition 1-2) If the current block division structure is dual tree chroma and the size of the chroma block is less than the minimum size that can be divided into quadtrees.
[0126] (Condition 1-3) If the current block division structure is dual tree chroma and the size of the chroma block is 4 or less
[0127] (Condition 1-4) If the division structure of the current block is dual tree chroma and the prediction mode type of the current block is MODE_TYPE_INTRA
[0128] Alternatively, if any of the following conditions 2-1 and 2-2 is satisfied, the binary division for the current block may be restricted.
[0129] (Condition 2-1) If the current block division structure is dual tree chroma and the product of the width and height of the chroma block is 16 or less
[0130] (Condition 2-2) If the division structure of the current block is dual tree chroma and the prediction mode type of the current block is MODE_TYPE_INTRA
[0131] Alternatively, if any of the following conditions 3-1 and 3-2 is satisfied, ternary partitioning for the current block may be restricted.
[0132] (Condition 3-1) If the current block division structure is dual tree chroma and the product of the width and height of the chroma block is 32 or less
[0133] (Condition 3-2) If the division structure of the current block is dual tree chroma and the prediction mode type of the current block is MODE_TYPE_INTRA
[0134] Switching from a single-tree structure to a dual-tree structure
[0135] In the single tree structure, a luma block and a chroma block corresponding to the luma block may be partitioned in the same manner. For example, if a luma block is vertically ternary partitioned, a chroma block corresponding to the luma block may also be vertically ternary partitioned. In this case, whether to partition a CU may be determined based on the size of a luma block included in the CU. And, the size of a chroma block corresponding to the luma block may be determined based on the size and color format of the luma block as described above with reference to Table 2.
[0136] Figure 9 is a diagram illustrating an example of luma blocks and chroma blocks in a 4:2:0 color format. Figures 10a to 10c are diagrams illustrating an example of a syntax for splitting a current CTU into local dual trees.
[0137] First, referring to FIG. 9, if the size of a luma block in a 4:2:0 color format is 16×8, the size of a chroma block corresponding to the luma block may be determined to be 8×4. In this case, vertical ternary division of the 8×4 chroma block may generate a 2×4 chroma block. If a chroma block is restricted to include at least 16 chroma samples, the 2×4 chroma block may not satisfy the minimum size restriction. Therefore, further division of the 8×4 chroma block in the 4:2:0 color format may be prohibited.
[0138] Even if additional splitting of chroma blocks is prohibited, additional splitting of luma blocks may be permitted. Thus, when additional splitting is performed only on luma blocks, the luma blocks and chroma blocks currently split into a single tree structure in the CTU may be switched to a dual tree structure. In this case, the split structure of the luma blocks and chroma blocks split into the dual tree structure may be referred to as a local dual tree structure.
[0139] 10a to 10c are diagrams showing an example of a syntax for switching a single tree structure to a dual tree structure, in which one coding_tree syntax is divided into three diagrams for convenience.
[0140] Referring to FIG. 10a to FIG. 10c, the mod Based on the eTypeCondition parameter, a prediction mode type of each CU generated from the current CTU may be determined. Here, modeTypeCondition may indicate a prediction mode characteristic of each of the CUs. Also, modeType may indicate a prediction mode type of each of the CUs. In one example, modeType may have one of the following values: MODE_TYPE_ALL indicating that all prediction modes such as intra prediction, IBC, palette mode, and inter prediction are available, MODE_TYPE_INTRA indicating that only intra prediction, IBC, and palette mode are available, and MODE_TYPE_INTER indicating that only inter prediction mode is available.
[0141] The modeTypeCondition of the current CU can have any one of a first value (eg, 0) to a third value (eg, 2) according to a predetermined condition.
[0142] Specifically, if at least one of the following conditions 4-1 to 4-4 is satisfied, modeTypeCondition may have a first value (eg, 0).
[0143] (Condition 4-1) If the current CU is included in an I slice, the CTU included in the slice is implicitly quadtree split into 64x64 luma sample CUs, and the 64x64 CUs become the root node of the dual tree.
[0144] (Condition 4-2) modeTypeCurr is not MODE_TYPE_ALL
[0145] (Condition 4-3) If the color format (chroma format) of the current block is monochrome
[0146] (Condition 4-4) If the color format of the current block is 4:4:4 format
[0147] If all of these conditions are not met and at least one of the following conditions 5-1 to 5-3 is met, modeTypeCondition may have a second value (e.g., 1). In conditions 5-1 to 5-3, the current CU may mean a luma component block of the current CU.
[0148] (Condition 5-1) The product of the width and height of the current CU is 64, and the current CU is quadtree-divided.
[0149] (Condition 5-2) When the product of the width and height of the current CU is 64, and the current CU is divided into horizontal or vertical ternaries
[0150] (Condition 5-3) When the product of the width and height of the current CU is 32, and the current CU is divided into horizontal or vertical binary parts
[0151] If all of these conditions are not met and at least one of the following conditions 6-1 to 6-4 is met, modeTypeCondition may have a second value (e.g., 1) or a third value (e.g., 2) depending on whether the current CU is included in an I slice. For example, if at least one of conditions 6-1 to 6-4 is met and the current CU is included in an I slice, modeTypeCondition has a second value, and if the current CU is not included in an I slice, modeTypeCondition has a third value. tion may have a third value. In conditions 6-1 to 6-4, the current CU may mean the luma component block of the current CU.
[0152] (Condition 6-1) The product of the width and height of the current CU is 64, the current CU is horizontally or vertically binary divided, and the color format of the current CU is 4:2:0.
[0153] (Condition 6-2) The product of the width and height of the luma block included in the current CU is 128, the current CU is divided into horizontal or vertical ternary parts, and the color format of the current CU is 4:2:0 format.
[0154] (Condition 6-3) When the width of the current CU is 8 and the current CU is horizontally binary divided
[0155] (Condition 6-4) When the width of the current CTU is 16 and the current CU is divided into vertical ternaries
[0156] If all these conditions are not met, modeTypeCondition may have a first value (eg, 0).
[0157] Then, the modeType of the current CU can be determined based on the value of modeTypeCondition.
[0158] Specifically, with reference to FIG. 10a, if modeTypeCondition has a second value (eg, 1) (1010), then modeType may be determined to be MODE_TYPE_INTRA (1020).
[0159] Alternatively, if modeTypeCondition has a third value (e.g., 2) (1030), modeType may be determined based on the value of mode_constraint_flag. Here, mode_constraint_flag may indicate whether or not an inter prediction mode is applicable to the current CU. For example, a first value (e.g., 0) of mode_constraint_flag may indicate that only an inter prediction mode is applicable to the current CU. In this case, modeType of the current CU may be determined as MODE_TYPE_INTER. In contrast, a second value (e.g., 1) of mode_constraint_flag may indicate that an inter prediction mode is not applicable to the current CU. In this case, modeType may be determined as MODE_TYPE_INTRA (1040).
[0160] Alternatively, if modeTypeCondition has a value other than the second value (e.g., 1) and the third value (e.g., 2) (e.g., if modeTypeCondition has the first value (e.g., 0), modeType may be determined to be the same value as modeTypeCurr (1050). Here, modeTypeCurr is a call input value of the coding_tree syntax and may represent the prediction mode type of the current CU. In one example, if the current CU is the root node of the partition tree, modeTypeCurr may be MODE_TYPE_ALL.
[0161] The modeType determined based on the value of modeTypeCondition can be used as an input value for calling the coding_tree syntax to call a sub-CU obtained by dividing the current CU.
[0162] Then, the current CU is divided and generated based on the modeType value of the current CU. A partition structure (treeType) of the lower CU may be determined (1060). For example, if the modeType of the current CU is MODE_TYPE_INTRA, the partition structure of the lower CU may be determined to be dual tree luma (DUAL_TREE_LUMA). Alternatively, if the modeType is not MODE_TYPE_INTRA, the partition structure of the lower CU may be the same as the partition structure (treeTypeCurr) of the current CU.
[0163] Information about the partition structure of the sub-CU can be stored in the parameter treeType. The treeType and modeType can be used as input values of the coding_tree syntax to further partition the current CU and call the sub-CU.
[0164] If the modeType of the lower CU is MODE_TYPE_INTRA, the current CU may be further split into a dual tree structure. Specifically, referring to FIG. 10b, if the modeType of the lower CU is MODE_TYPE_INTRA, the lower CU may have a dual tree luma (DUAL_TREE_LUMA) tree structure. That is, the luma component and the chroma component of the current CU may be split into separate tree structures (1070). Also, referring to FIG. 10c, if the modeTypeCurr of the current CU is MODE_TYPE_ALL and the modeType of the lower CU is MODE_TYPE_INTRA, the chroma component of the current CU is not split and the lower CU may have a dual tree chroma (DUAL_TRE_CHROMA) tree structure (1080).
[0165] In this manner, the modeType of the lower CU may be determined based on the modeTypeCondition. Also, if the modeType of the lower CU is MODE_TYPE_INTRA, the luma component of the lower CU may have a dual tree luma tree structure, and the chroma component of the lower CU may have a dual tree chroma tree structure. In other words, the lower CU partially has a dual tree structure within the current CTU, and such a division structure may be referred to as a local dual tree structure.
[0166] The following describes intra prediction modes and intra prediction of chroma blocks.
[0167] Overview of Intra Prediction Modes
[0168] Intra prediction may refer to a prediction that generates a prediction sample for a current block based on a reference sample in a picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include a total of 2×nH samples adjacent to the left boundary and bottom-left of the current block of size nW×nH, a total of 2×nW samples adjacent to the top boundary and top-right of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. In addition, the surrounding reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0169] However, some of the surrounding reference samples of the current block may not yet be decoded or may not be available. In this case, the decoder uses them as available samples. Neighboring reference samples used for prediction can be constructed by substitution of unavailable samples, or through interpolation of available samples.
[0170] When neighboring reference samples are derived, (i) a predicted sample may be derived based on an average or an interpolation of neighboring reference samples of the current block, or (ii) a predicted sample may be derived based on a reference sample that exists in a specific (prediction) direction for the predicted sample among the neighboring reference samples of the current block. The case of (i) may be called a non-directional mode or a non-angular mode, and the case of (ii) may be called a directional mode or an angular mode.
[0171] In addition, the prediction sample may be generated by interpolating a first neighboring sample located in a prediction direction of an intra prediction mode of the current block and a second neighboring sample located in the opposite direction based on a prediction target sample of the current block among the neighboring reference samples. The above case may be called linear interpolation intra prediction (LIP).
[0172] Alternatively, a chroma prediction sample may be generated based on a luma sample using a linear model, in which case it may be referred to as a Linear Model (LM) mode.
[0173] In addition, a temporal prediction sample of the current block may be derived based on the filtered neighboring reference samples, and a prediction sample of the current block may be derived by weighting the temporal prediction sample and at least one reference sample derived according to the intra prediction mode among the conventional neighboring reference samples, i.e., non-filtered neighboring reference samples. In this case, it may be called Position Dependent Intra Prediction (PDPC).
[0174] Also, a reference sample line with the highest prediction accuracy may be selected from among multiple reference sample lines surrounding the current block, and a prediction sample may be derived using a reference sample located in a prediction direction from the selected reference sample line. At this time, information on the used reference sample line (e.g., intra_luma_ref_idx) may be coded and signaled in a bitstream. In this case, it may be called MRL (multi-reference line intra prediction) or MRL-based intra prediction.
[0175] Also, the current block may be divided into vertical or horizontal sub-partitions, and intra prediction may be performed for each sub-partition based on the same intra prediction mode. In this case, the neighboring reference samples for intra prediction may be derived for each sub-partition. That is, in the encoding / decoding order, the restored samples of the previous sub-partition may be used as the neighboring reference samples for the current sub-partition. In this case, the intra prediction mode for the current block is applied to the sub-partitions in the same manner, but the neighboring reference samples may be derived and used for each sub-partition, thereby improving the intra prediction performance in some cases. Such a prediction method may be called ISP (intra sub-partitions) or ISP-based intra prediction.
[0176] The above-mentioned intra prediction techniques are classified into directional and non-directional intra prediction modes. The intra prediction technique (e.g., intra prediction type or additional intra prediction mode) may be referred to by various terms such as LIP, LM, PDPC, MRL, and ISP. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0177] Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. In addition, a post-processing filtering step may be performed on the derived prediction sample, if necessary.
[0178] FIG. 11 is a flow chart illustrating a video / image coding method based on intra prediction.
[0179] The encoding method of FIG. 11 may be performed by the image encoding device of FIG. 2. Specifically, step S1110 may be performed by the intra prediction unit 185, and step S1120 may be performed by the residual processing unit. Specifically, step S1120 may be performed by the subtraction unit 115. Step S1130 may be performed by the entropy encoding unit 190. The prediction information of step S1130 may be derived by the intra prediction unit 185, and the residual information of step S1130 may be derived by the residual processing unit. The residual information is information about the residual sample. The residual information may include information about quantized transform coefficients for the residual sample. As described above, the residual sample may be derived into transform coefficients through the transform unit 120 of the image encoding device, and the transform coefficients may be derived into quantized transform coefficients through the quantization unit 130. The information about the quantized transform coefficients may be coded in the entropy encoding unit 190 through a residual coding procedure.
[0180] The image encoding apparatus may perform intra prediction on a current block (S1110). The image encoding apparatus may determine an intra prediction mode / type for the current block, derive surrounding reference samples for the current block, and then generate predicted samples in the current block based on the intra prediction mode / type and the surrounding reference samples. Here, the steps of determining the intra prediction mode / type, deriving the surrounding reference samples, and generating predicted samples may be performed simultaneously, or one of the steps may be performed prior to the other steps.
[0181] FIG. 12 is a diagram illustrating an example configuration of an intra prediction unit according to the present disclosure.
[0182] As shown in FIG. 12, the intra prediction unit 185 of the image encoding device may include an intra prediction mode / type determination unit 186, a reference sample derivation unit 187, and / or a prediction sample derivation unit 188. The intra prediction mode / type determination unit 186 may determine an intra prediction mode / type for the current block. The reference sample derivation unit 187 may derive neighboring reference samples of the current block. The prediction sample derivation unit 188 may derive a prediction sample of the current block. Meanwhile, although not shown, if a prediction sample filtering procedure (not shown) is performed, the intra prediction unit 185 may further include a prediction sample filter unit (not shown).
[0183] The image encoding apparatus may determine a mode / type to be applied to the current block from among a plurality of intra prediction modes / types, and may compare rate-distortion costs (RD costs) for the intra prediction modes / types to determine an optimal intra prediction mode / type for the current block.
[0184] Meanwhile, the image coding apparatus may also perform a prediction sample filtering procedure. The prediction sample filtering may be called post-filtering. The prediction sample filtering procedure may filter some or all of the prediction samples. In some cases, the prediction sample filtering procedure may be omitted.
[0185] 11 again, the image encoding apparatus may generate a residual sample for the current block based on a predicted sample or a filtered predicted sample (S1120). The image encoding apparatus may derive the residual sample by subtracting the predicted sample from an original sample of the current block. That is, the image encoding apparatus may derive a residual sample value by subtracting a corresponding predicted sample value from an original sample value.
[0186] The image encoding apparatus may encode image information including information on the intra prediction (prediction information) and residual information on the residual sample (S1130). The prediction information may include intra prediction mode information and / or intra prediction technique information. The image encoding apparatus may output the encoded image information in a bitstream format. The output bitstream may be transmitted to an image decoding apparatus via a storage medium or a network.
[0187] The residual information may include a residual coding syntax, which will be described later. The image encoding apparatus may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.
[0188] Meanwhile, as described above, the image coding apparatus may generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the image coding apparatus may further inverse quantize / inverse transform the quantized transform coefficients to derive (modified) residual samples. The reason for performing inverse quantization / inverse transform again after transforming / quantizing the residual samples is to derive residual samples identical to the residual samples derived in the image decoding apparatus. The image coding apparatus may generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure or the like may further be applied to the reconstructed picture.
[0189] FIG. 13 is a flow chart illustrating a video / image decoding method based on intra prediction.
[0190] The image decoding apparatus can perform operations corresponding to those performed by the image encoding apparatus.
[0191] The decoding method of FIG. 13 may be performed by the image decoding device of FIG. 3. Steps S1310 to S1330 may be performed by the intra prediction unit 265, and the prediction information of step S1310 and the residual information of step S1440 may be obtained from a bitstream by the entropy decoding unit 210. The residual processing unit of the image decoding device may derive a residual sample for a current block based on the residual information (S1340). Specifically, the inverse quantization unit 220 of the residual processing unit derives transform coefficients by performing inverse quantization based on the quantized transform coefficients derived based on the residual information, and performs the inverse quantization based on the quantized transform coefficients derived based on the residual information. The inverse transform unit 230 of the current block may perform an inverse transform on the transform coefficients to derive residual samples for the current block. Step S1350 may be performed by the adder 235 or a reconstruction unit.
[0192] Specifically, the image decoding apparatus may derive an intra prediction mode / type for a current block based on received prediction information (intra prediction mode / type information) (S1310). The image decoding apparatus may also derive neighboring reference samples for the current block (S1320). The image decoding apparatus may generate prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples (S1330). In this case, the image decoding apparatus may perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0193] The image decoding apparatus may generate residual samples for the current block based on the received residual information (S1340). The image decoding apparatus may generate reconstructed samples for the current block from the predicted samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S1350). A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure may be further applied based on the reconstructed picture.
[0194] FIG. 14 is a diagram illustrating an example configuration of an intra prediction unit according to the present disclosure.
[0195] As shown in FIG. 14, the intra prediction unit 265 of the image decoding apparatus may include an intra prediction mode / type determination unit 266, a reference sample derivation unit 267, and a prediction sample derivation unit 268. The intra prediction mode / type determination unit 266 determines an intra prediction mode / type for the current block based on intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit 186 of the image encoding apparatus, and the reference sample derivation unit 266 may derive a neighboring reference sample of the current block from a restored reference area in the current picture. The prediction sample derivation unit 268 may derive a prediction sample of the current block. Meanwhile, although not shown, if the above-mentioned prediction sample filtering procedure is performed, the intra prediction unit 265 may further include a prediction sample filter unit (not shown).
[0196] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag and / or intra_chroma_mpm_flag) indicating whether a most probable mode (MPM) is applied to the current block or a remaining mode is applied. If the MPM is applied to the current block, the intra prediction mode information may further include index information (e.g., intra_luma_mpm_idx and / or intra_chroma_mpm_idx) indicating one of intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. In addition, if the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder and / or intra_chroma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The image decoding apparatus performs the following steps based on the intra prediction mode information: The MPM candidate modes may include the intra prediction modes of neighboring blocks (e.g., the left neighboring block and / or the upper neighboring block) of the current block and additional candidate modes.
[0197] As an example, the intra prediction modes may include two non-directional intra prediction modes and 33 directional intra prediction modes. The non-directional intra prediction modes may include a planar mode and a DC mode, and the directional intra prediction modes may include intra prediction modes No. 2 to No. 34. The planar intra prediction mode may be referred to as a planar mode, and the DC intra prediction mode may be referred to as a DC mode.
[0198] Alternatively, to capture any edge direction presented in a natural video, the intra prediction modes may include two non-directional intra prediction modes and 65 extended directional intra prediction modes. The non-directional intra prediction modes may include a Planar mode and a DC mode, and the extended directional intra prediction modes may include intra prediction modes 2 to 66. The intra prediction modes may be applied to blocks of all sizes and may be applied to both luma components (luma blocks) and chroma components (chroma blocks).
[0199] Alternatively, the intra prediction modes may include two non-directional intra prediction modes and 129 directional intra prediction modes. The non-directional intra prediction modes may include a Planar mode and a DC mode, and the directional intra prediction modes may include intra prediction modes 2 to 130.
[0200] Meanwhile, the intra prediction modes may further include a cross-component linear model (CCLM) mode for chroma samples in addition to the above-mentioned intra prediction modes. The CCLM modes may be divided into L_CCLM, T_CCLM, and LT_CCLM depending on whether the left sample, the top sample, or both are considered for deriving the LM parameters, and may be applied only to the chroma components.
[0201] In another example, the intra prediction modes include 93 directional intra prediction modes along with two non-directional intra prediction modes to capture any edge direction presented in natural video. The non-directional intra prediction modes may include a planar mode and a DC mode. The planar mode may be denoted as INTRA_PLANAR, and the DC mode may be denoted as INTRA_DC. And, the directional intra prediction modes may be denoted as INTRA_ANGULAR-14 to INTRA_ANGULAR-1, and INTRA_ANGULAR2 to INTRA_ANGULAR80.
[0202] Meanwhile, the intra prediction technique information may be realized in various forms. For example, the intra prediction technique information may include intra prediction technique index information indicating one of a plurality of intra prediction techniques. For another example, the intra prediction technique information may include reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_mode_flag) indicating a subpartition type when the ISP is applied, and ISP type information (e.g., intra_subpartitions_mode_flag) indicating a subpartition type when the ISP is applied. The ISP flag information may include at least one of ISP application indicator, ISP group information (e.g., intra_subpartitions_split_flag), flag information indicating whether PDPC is applied, or flag information indicating whether LIP is applied. In this disclosure, the ISP flag information may be referred to as an ISP application indicator.
[0203] The intra prediction mode information and / or the intra prediction technique information may be encoded / decoded using a coding method described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction technique information may be encoded / decoded through entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0204] Chroma block intra prediction
[0205] 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.
[0206] 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 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. Also, CCLM may also be referred to as a Linear Model (LM).
[0207] 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 to 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 then a sample derived as shown in Equation 1 is applied to the subsampled sample as a prediction sample of the chroma block.
[0208]
number
[0209] Here, pred c (i,j) is the (i,j) of the current chroma block in the current CU The predicted sample of the coordinates can be shown. L '(i,j) is the current It can be used to denote the reconstructed sample of the (i,j) coordinate of the current luma block. For example, rec L Let '(i,j) denote the down-sampled reconstructed sample of the current luma block. The linear model coefficients α and β may be signaled, or may be derived from surrounding samples.
[0210] When a chroma block is predicted with DM, the intra prediction mode of the chroma block can be derived to the intra prediction mode of the corresponding luma block. For example, the intra prediction mode of a given position of the corresponding luma block can be used as the intra prediction mode of the chroma block.
[0211] On the other hand, intra prediction of chroma blocks is performed using multiple direct multi-threading (DM). The multiple DM may be performed using Multiple DM Modes (MDM). The multiple DM is a mode in which the above-mentioned single DM is expanded to multiple modes, and in order to derive an intra prediction mode of a chroma block, a DM candidate list including multiple DM candidates is formed, and one of the candidates included in the DM candidate list may be derived as the intra prediction mode of the chroma block. When the multiple DM is applied, the DM candidate list may include at least one of the following multiple DM candidates:
[0212] - Intra prediction mode for CR, TL, TR, BL, BR positions of the corresponding luma block
[0213] - Intra prediction mode for L, A, BL, AR, and AL positions, which are the surrounding blocks of the chroma block
[0214] -Planar mode and DC mode
[0215] -Directional mode derived by adding or subtracting a given offset (e.g., 1) to the directional mode already included
[0216] - Default DM candidate modes: Vertical mode, Horizontal mode, 2, 34, 66, 10, 26 modes (for 65 directional modes)
[0217] -If the four default DM candidates (PLANAR mode, DC mode, vertical mode and horizontal mode) are not included in the DM candidate list, the missing default DM candidates will replace the DM candidates already included in the list.
[0218] The intra prediction mode of a chroma block may be derived based on intra chroma prediction mode information (intra_chroma_pred_mode) and / or the intra prediction mode of a corresponding luma block. For example, if the intra chroma prediction mode information indicates DM, the intra prediction mode of a chroma block may be determined to be the same as the intra prediction mode of a corresponding luma block.
[0219] According to the above-mentioned intra prediction method, intra prediction for a luma block may be performed based on an MPM list, and intra prediction for a chroma block may be performed based on a predetermined default mode and / or DM. The default intra prediction mode may include a planar mode, a DC mode, a vertical mode, and a horizontal mode.
[0220] The palette mode will now be described.
[0221] Palette Mode Overview
[0222] The palette mode may indicate a prediction mode in which a current block is encoded / decoded based on a palette (or a palette table) including a set of predetermined representative color values. In the palette mode, each sample in the current block is assigned a predetermined representative color value. In this disclosure, encoding / decoding using the palette mode can be referred to as palette encoding / decoding.
[0223] Palette mode can be used to improve the efficiency of encoding / decoding a particular image. For example, screen content, which is an image that includes a significant amount of text and graphics and is generated by electronic devices such as computers and smartphones, includes local regions separated by sharp edges, and the local regions can be represented by a relatively small number of pixel values. Therefore, the palette mode, which represents most pixel values in a current block by a relatively small number of indexes, can be more effective in encoding / decoding screen content than other prediction modes (e.g., intra prediction mode, inter prediction mode, etc.).
[0224] The palette mode is one of the above-mentioned intra prediction modes, and may be called a palette coding mode, an intra palette mode, an intra palette coding mode, etc. However, when the palette mode is applied to the current block, unlike the case of the intra prediction mode, the residual value for the current block may not be separately signaled. In this respect, the palette mode may be similar to the above-mentioned skip mode.
[0225] When the current block has a single tree structure, the palette mode can be applied to both the luma component and the chroma component of the current block together. For example, when the palette mode is applied to the luma component of the current block having a single tree structure, the palette mode can be applied to the chroma component of the current block. In contrast, when the current block has a dual tree structure, the palette mode can be applied to the luma component and the chroma component of the current block separately. For example, when the palette mode is applied to the luma component of the current block having a dual tree structure, the palette mode can be applied to the chroma component of the current block, or any one of the other prediction modes (e.g., intra prediction mode, inter prediction mode, etc.) can be applied.
[0226] If a palette mode is applied to the current block, a palette table for the current block can be constructed based on the palette predictor.
[0227] The palette predictor may include one or more palette entries (representative color values) and one or more palette indexes for identifying each of the palette entries. In one example, the palette predictor may be initialized to a predetermined value (e.g., 0) at the time of the first encoding / decoding of the CTU (or slice) including the current block. The palette predictor may then be updated using at least one palette entry used in the palette encoding / decoding. In one example, until the size of the palette predictor reaches a predetermined maximum size (i.e., until the palette predictor includes the maximum number of allowed palette entries), a palette entry of the previous palette predictor that is not included in the current palette table may be added to the last position (index) of the palette predictor for the next palette encoding. This may be called palette stuffing.
[0228] The palette table may include at least one palette entry included in the palette predictor, and at least one palette index for identifying the palette entry. For each palette entry included in the palette predictor, a reuse flag indicating whether the palette entry is included in the palette table may be signaled via the bitstream. In this case, a reuse flag having a first value (e.g., 0) may indicate that the palette entry is not included in the palette table. Alternatively, a reuse flag having a second value (e.g., 1) may indicate that the palette entry is not included in the palette table. A reuse flag may be included to indicate that the palette entry is included in the palette table. The reuse flag may be encoded, for example, using run-length coding for zero values.
[0229] The palette table may also include at least one new palette entry that is not included in the palette predictor, and at least one palette index for identifying the new palette entry. Information about the new palette entry (e.g., total number, component values, etc.) may be coded using, for example, a zeroth order exponential-Golomb code and signaled via the bitstream.
[0230] Based on the palette table, a palette index map for a current block to be coded may be generated. Specifically, a palette index map for the current block may be generated by mapping a predetermined palette index in the palette table to each of a plurality of samples in the current block based on similarity between the pixel value of each of the samples and the representative color value. In this case, an escape palette index may be mapped to a sample (escape sample) having a pixel value that is not similar to a representative color value (palette entry) defined in the palette table among the plurality of samples in the current block. The escape palette index indicates an escape sample (escape symbol) and may have the largest value in the palette table. In one example, whether the current block includes an escape sample may be signaled using an escape sample flag (e.g., palette_escape_val_present_flag). For example, palette_escape_val_present_flag having a first value (e.g., 0) may indicate that the current block does not include an escape sample. Alternatively, palette_escape_val_present_flag having a second value (eg, 1) may indicate that the current block contains an escape sample.
[0231] Palette index prediction information regarding the palette index map may be signaled via a bitstream. The palette index prediction information may include at least one palette index mapped to the current block and run value information of the palette index. The run value of the palette index may indicate a value obtained by subtracting 1 from the number of palette indexes consecutively mapped to the current block with the same value. For example, if the current block includes first to fourth samples consecutively existing along a predetermined scan direction (e.g., horizontal direction), and a first palette index (e.g., 0) is mapped to each of the first to third samples, and a palette index (e.g., 1) is mapped to the fourth sample, the run value of the first palette index may be 2 and the run value of the second palette index may be 0. If the current block includes an escape sample (escape symbol) (e.g., palette_escape_val_present_flag=1), the palette index prediction information may include run value information of the escape palette index mapped to the escape sample.
[0232] Based on the palette index prediction information, a palette index map for a current block to be decoded may be generated. For example, the palette index map for the current block may be generated by mapping one or more palette indexes obtained from the palette index prediction information to a plurality of samples in the current block. In one example, based on the last palette index (in the mapping order) of one or more palette indexes obtained from the palette index prediction information, the value of each of the one or more palette indexes may be adjusted. For example, For example, if the last palette index obtained from the palette index prediction information is an escape palette index, one or more palette entries obtained from the palette index prediction information may be mapped to the current block with values incremented by a given size (e.g., 1).
[0233] The current block may be encoded / decoded based on a palette index map. For samples in the current block that have pixel values that are the same as or similar to the representative color values defined in the palette table, the value of the palette index indicating the representative color value may be signaled via the bitstream. In contrast, for samples in the current block that have pixel values that are not similar to the representative color values defined in the palette table, the quantized pixel value of the sample may be directly signaled via the bitstream.
[0234] In order to encode the palette index mapped to the current block, the palette index map may be scanned using a predetermined scanning method, and in order to construct the palette index map using the palette index obtained from the bitstream, the current block may be scanned using a predetermined scanning method.
[0235] FIG. 15 is a diagram showing an example of a scanning method that can be used in the palette mode.
[0236] Referring to Figure 15, the scan methods available in the palette mode include horizontal traverse scan and vertical traverse scan. Horizontal traverse scan may refer to a method of scanning odd-numbered rows of a current block (or palette index map) from left to right and scanning even-numbered rows of the current block from right to left. Also, vertical traverse scan may refer to a method of scanning odd-numbered columns of the current block from top to bottom and scanning even-numbered columns of the current block from bottom to top.
[0237] Information about the scan scheme available in the palette mode may be signaled using a predetermined flag (e.g., palette_transpose_flag). For example, if a horizontal traverse scan is used for palette coding of the current block, palette_transpose_flag having a first value (e.g., 0) may be signaled via the bitstream. In contrast, if a vertical traverse scan is used for palette coding of the current block, palette_transpose_flag having a second value (e.g., 1) may be signaled via the bitstream.
[0238] The palette index mapped to each sample in the current block can be coded using the "INDEX" and "COPY_ABOVE" modes, which in this disclosure can be referred to as palette sample modes.
[0239] Except for the top row of the current block in the horizontal traverse scan, the leftmost column of the current block in the vertical traverse scan, and the previous palette sample mode being "COPY_ABOVE", information about the palette sample mode can be signaled using a certain flag (e.g., copy_above_palette_indices_flag). The copy_above_palette_indices_flag may indicate that a given palette index mapped to the current block is coded using the "INDEX" mode. Differently, the copy_above_palette_indices_flag with a second value (e.g., 1) may indicate that a given palette index mapped to the current block is coded using the "COPY_ABOVE" mode.
[0240] In the 'INDEX' mode, the value of the palette index can be explicitly signaled via the bitstream. In the 'INDEX' and 'COPY_ABOVE' modes, run value information indicating the number of samples consecutively coded using the same palette sample mode can be signaled via the bitstream.
[0241] The palette indices contained in the palette index map can be encoded in the following order:
[0242] First, the number of palette indexes mapped to the current block (or the current CU) may be signaled. Then, the value of each of the palette indexes may be signaled using fixed length coding. In one example, the number of palette indexes and the value of each palette index may be coded using a bypass mode. Through this, bypass bins associated with the palette indexes may be grouped. Then, information on the palette sample mode (e.g., copy_above_palette_indices_flag) and run value information of the palette sample mode may be signaled in an interleaved manner. Finally, component escape values corresponding to escape samples in the current block may be grouped and coded in the bypass mode. In one example, after the value of each palette index is signaled, at least one additional syntax element (e.g., last_run_type_flag) may be further signaled. In this case, the signaling process for the run value corresponding to the last run in the current block may be skipped based on the number of palette indexes and the additional syntax element.
[0243] FIG. 16 illustrates an example of a palette encoding process for a current block.
[0244] 16, a number of pixels (samples) in a current block can be represented using a total of three color values (S1610). For example, a first pixel PX1 can have a first color value, a second pixel PX2 can have a second color value, and a third pixel PX3 can have a third color value.
[0245] If the palette mode is applied to the current block, a palette table for the current block may be configured (S1620). The palette table may include palette entries (representative color values) for each color component (e.g., (G,B,R), (Y,Cb,Cr), etc.) and palette indices (e.g., 0,1) for identifying each palette entry. The palette table may further include an escape palette index (e.g., 2). The escape palette index may be mapped to an escape sample (or escape symbol) having a pixel value that is not similar to a representative color value defined in the palette table among a plurality of pixels in the current block. For an escape sample to which the escape palette index is mapped, a quantized pixel value of the escape sample may be signaled.
[0246] A palette index map for the current block may be generated by mapping a predetermined palette index in a palette table to each of a plurality of samples in the current block based on the similarity between the pixel value and the representative color value of each of the samples (S1630). For example, the palette index map for the current block may be generated by mapping a first palette index (e.g., 0) to each of the first pixels PX1, mapping a second palette index (e.g., 1) to each of the second pixels PX2, and mapping an escape palette index (e.g., 2) to a third pixel PX3, which is an escape sample.
[0247] In order to encode the palette index map, the palette indexes included in the palette index map are scanned according to a predetermined scanning method, and thus a palette sample mode and a palette sample mode run value for each of a plurality of samples in the current block can be derived (S1640, S1650). For example, the palette indexes "1,0,1,1,1" successively mapped to the third row of the palette index map in the horizontal traverse scan have the same index value as the palette index at the same position in the second row of the palette index map, and thus can be encoded in the "COPY_ABOVE" mode, and the run value of the "COPY_ABOVE" mode can be 4 (S1640). In addition, the palette indexes "1,1,1" successively mapped to the second row of the palette index map in the horizontal traverse scan have a different index value from the palette index at the same position in the first row of the palette index map, and thus can be encoded in the "INDEX" mode. The run value of the "INDEX" mode can be 2 (S1650). On the other hand, the escape palette index (eg, 2) that is mapped to the third pixel PX3, which is an escape sample, can be coded in "INDEX" mode.
[0248] In this manner, when a palette mode is applied to the current block, a palette index map is generated by mapping a predetermined palette index in the palette table to each of the samples in the current block, and the palette index included in the palette index map can be coded in “INDEX” mode or “COPY_ABOVE” mode according to a predetermined scanning method.
[0249] The syntax elements for the palette mode are described below.
[0250] Figure 17 is a diagram showing a part of the coding_unit syntax for the palette mode, and Figures 18a to 18e are diagrams showing the pallet_coding syntax for the palette mode. The syntax elements for the palette mode can be coded as shown in Figure 17 and Figures 18a to 18e and signaled via a bitstream.
[0251] First, referring to FIG. 17, the palette mode flag pred_mode_plt_flag may indicate whether the palette mode is applied to the current block (or the current CU). For example, a first value (e.g., 0) of pred_mode_plt_flag may indicate that the palette mode is not applied to the current block. In contrast, a second value (e.g., 1) of pred_mode_plt_flag may indicate that the palette mode is applied to the current block. 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.
[0252] Referring to Figure 18a, the parameter PredictorPaletteSize[st artComp] may indicate the size of the palette predictor for the first color component startComp of the palette table (current palette table) for the current block.
[0253] In addition, the parameter PalettePredictorEntryReuseFlags[i] may indicate whether the i-th palette entry in the palette predictor is currently included in the palette table (i.e., whether it is reused). For example, PalettePredictorEntryReuseFlags[i] having a first value (e.g., 0) may indicate that the i-th palette entry of the palette predictor is not currently reused in the palette table. In contrast, PalettePredictorEntryReuseFlags[i] having a second value (e.g., 1) may indicate that the i-th palette entry of the palette predictor is currently reused in the palette table. In one example, an initial value of PalettePredictorEntryReuseFlags[i] may be set to 0.
[0254] Additionally, the parameter palette_predictor_run may indicate the number of zeros that exist before any non-zero palette entries in the PalettePredictorEntryReuseFlags array.
[0255] In addition, the parameter num_signalled_palette_entries may indicate the number of palette entries in the current palette table 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 inferred to be 0.
[0256] 18b, the parameter CurrentPaletteSize[startComp] may indicate the size of the current palette table for the first color component startComp of the current palette table. The value of CurrentPaletteSize[startComp] may be calculated according to Equation 2 below. In one example, CurrentPaletteSize[startComp] may have a value between 0 and palette_max_size.
[0257] [Formula 2] CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries
[0258] Additionally, the parameter new_palette_entries[cIdx][i] may indicate the value of the new palette entry that is signaled for the i-th color component cIdx.
[0259] Additionally, the parameter PredictorPaletteEntries[cIdx][i] may indicate the i-th palette entry in the palette predictor for color component cIdx.
[0260] Additionally, the parameter CurrentPaletteEntries[cId][i] may indicate the i-th palette entry in the current palette table for the color component cIdx.
[0261] Furthermore, the parameter palette_escape_val_present_flag may indicate the presence or absence of an escape sample (escape symbol). For example, palette_escape_val_present_flag having a first value (e.g., 0) may indicate that the current block does not contain an escape sample. In contrast, palette_escape_val_present_flag having a second value (e.g., 1) indicates that the current block contains at least one escape sample. If palette_escape_val_present_flag is not obtained from the bitstream, the value of palette_escape_val_present_flag can be inferred to be 1.
[0262] In addition, the parameter MaxPaletteIndex may indicate the maximum value of the palette index in the current palette table. The value of MaxPaletteIndex may be calculated using Equation 3 below.
[0263] [Formula 3] MaxPaletteIndex=CurrentPaletteSize[startComp]+palette_escape_val_present_flag
[0264] In addition, the parameter num_palette_indices_minus1 may indicate a value obtained by subtracting 1 from the number of palette indexes signaled in the palette encoding process of the current block. If num_palette_indices_minus1 is not obtained from the bitstream, the value of num_palette_indices_minus1 may be inferred to be 0.
[0265] Additionally, the parameter palette_idx_idc may be an indicator of the palette index for the current palette table CurrentPaletteEntries. palette_idx_idc may have a value between 0 and MaxPaletteIndex for the first palette index of the block, and between 0 and MaxPaletteIndex-1 for the remaining palette indexes of the block. If a value for palette_idx_idc is not obtained from the bitstream, the value of palette_idx_idc may be inferred to be 0.
[0266] Also, the parameter PaletteIndexIdc[i] may indicate the i-th palette_idx_idc. In one example, all values of the array PaletteIndexIdc may be initialized to 0.
[0267] In addition, the parameter copy_above_indices_for_final_run_flag may indicate whether the palette index of the last position in the current block is copied from the previous palette index. For example, copy_above_indices_for_final_run_flag having a first value (e.g., 0) may indicate that the palette index of the last position in the current block is copied from PaletteIndexIdc[num_palette_indices_minus1]. In contrast, copy_above_indices_for_final_run_flag having a second value (e.g., 1) may indicate that the palette index of the last position in the current block is copied from the palette index of a neighboring sample. If a vertical traverse scan is used, the neighboring sample may be a sample located in the same position as the current sample in a column to the left of the current sample. If a horizontal traverse scan is used, the neighboring sample may be a sample located in the same position as the current sample in a row above the current sample. copy_above_indices_for_final_ru If n_flag is not obtained from the bitstream, the value of copy_above_indices_for_final_run_flag can be inferred to be 0.
[0268] In addition, the parameter palette_transpose_flag may indicate a scanning manner of the current block (or palette index map). For example, palette_transpose_flag having a first value (e.g., 0) may indicate that a horizontal traverse scan is applied to the current block. Differently, palette_transpose_flag having a second value (e.g., 1) may indicate that a vertical traverse scan is applied to the current block. If palette_transpose_flag is not obtained in the bitstream, the value of palette_transpose_flag may be inferred to be 0.
[0269] Referring to Figure 18c, the parameter copy_above_palette_indices_flag may indicate an encoding mode (palette sample mode) for a current sample in a current block. For example, copy_above_palette_indices_flag having a first value (e.g., 0) may indicate that the palette index mapped to the current sample is encoded in the "INDEX" mode. In contrast, copy_above_palette_indices_flag having a second value (e.g., 1) may indicate that the palette index mapped to the current sample is encoded in the "COPY_ABOVE" mode.
[0270] Furthermore, the parameter CopyAboveIndicesFlag[xC][yC] may indicate the coding mode for each of the samples in the current block, i.e., CopyAboveIndicesFlag may be an array of copy_above_palette_indices_flag for each of the samples in the current block, where xC and yC may be coordinate indicators indicating the relative position of the current sample from the top-left sample of the current picture.
[0271] When CopyAboveIndicesFlag[xC][yC] has a first value (e.g., 0), PaletteRunMinus1 may indicate a value obtained by subtracting 1 from the number of palette indexes consecutively encoded using the "COPY_ABOVE" mode. Conversely, when CopyAboveIndicesFlag[xC][yC] has a second value (e.g., 1), PaletteRunMinus1 may indicate a value obtained by subtracting 1 from the number of palette indexes consecutively encoded using the "INDEX" mode.
[0272] Referring to Figure 18d, the parameters PaletteIndexMap[xC][yC] may indicate a palette index map for the current block. That is, PaletteIndexMap may be an array of CurrentPaletteEntries for each of the samples in the current block, where xC and yC may be coordinate indicators indicating the relative position of the current sample from the top-left sample of the current picture. In one example, PaletteIndexMap[xC][yC] may have a value between 0 and (MaxPaletteIndex-1).
[0273] Additionally, a parameter PaletteMaxRunMinus1 may indicate a maximum value of PaletteRunMinus1. In one example, PaletteMaxRunMinus1 may have a value greater than 0.
[0274] Additionally, the parameter palette_run_prefix can indicate the prefix portion used in binarizing PaletteRunMinus1.
[0275] Additionally, the parameter palette_run_suffix may indicate the suffix portion used for binarization of PaletteRunMinus1. If palette_run_suffix is not obtained from the bitstream, the value of palette_run_suffix may be inferred to be 0.
[0276] In one example, if the value of PaletteMaxRunMinus1 is 0, the value of PaletteRunMinus1 may be set to 0. Alternatively, if PaletteMaxRunMinus1 is greater than 0, PaletteRunMinus1 may be set based on the value of palette_run_prefix. For example, if the value of palette_run_prefix is less than 2, the value of PaletteRunMinus1 may be set according to Equation 4 below.
[0277] [Formula 4] PaletteRunMinus1=palette_run_prefix
[0278] When the value of palette_run_prefix is 2 or greater, the value of PaletteRunMinus1 can be calculated according to Equation 5 below.
[0279] [Formula 5] PrefixOffset=1<<(palette_run_prefix-1) PaletteRunMinus1=PrefixOffset+palette_run_suffix
[0280] Referring to Figure 18e, the parameter palette_escape_val may indicate the quantized pixel value of the escape sample in the current block.
[0281] Also, the parameter PaletteEscapeVal[cIdx][xC][yC] may indicate the quantized pixel value of the escape sample where the value of PaletteIndexMap[xC][yC] is MaxPaletteIndex and the value of palette_escape_val_present_flag is 1. Here, cIdx indicates a color component, and xC and yC may be coordinate indicators indicating the relative position of the current sample from the top-left sample of the current picture.
[0282] A method of applying the palette mode to a current block having a local dual tree structure will now be described.
[0283] Applying palette mode to the current block with local dual tree structure
[0284] FIG. 19 is a diagram showing an example of a CU having a local dual tree structure.
[0285] 19, a current CU may be divided into a quadtree structure for each of the luma and chroma components. For example, in a current CU having a 4:2:0 color format, a 16×16 luma block may be quadtree divided to generate first to fourth luma blocks 1911 to 1914 each having a size of 8×8. Also, an 8×8 chroma block may be quadtree divided to generate first to fourth chroma blocks 1921 to 1924 each having a size of 4×4. In this case, a first chroma block 1921 may correspond to a first luma block 1911, a second chroma block 1922 may correspond to a second luma block 1912, a third chroma block 1923 may correspond to a third luma block 1913, and a fourth chroma block 1924 may correspond to a fourth luma block 1914.
[0286] When the minimum size of a chroma block is limited to include 16 or more chroma samples, additional division of the first to fourth chroma blocks 1921 to 1924 may be prohibited. In contrast, additional division of the first to fourth luma blocks 1911 to 1914 may be permitted to improve coding efficiency. As a result, the third luma block 1913 is vertically binary divided to generate two luma blocks 1913-1 and 1913-2 each having a size of 4×8. In this case, the division structure of the third luma block 1913 may be called dual tree luma DUAL_TREE_LUMA, and the division structure of the third chroma block 1923 may be called dual tree chroma DUAL_TREE_CHROMA. In addition, among a plurality of lower CUs generated by dividing the current CU, only the lower CU including the third luma block 1913 and the third chroma block 1923 has a dual tree structure, and therefore the division structure of the lower CU may be called a local dual tree structure. In this case, an example of a decoding process for the current CU is shown in FIG.
[0287] FIG. 20 is a diagram showing an example of a decoding process for the current CU in the example of FIG.
[0288] The luma blocks and chroma blocks of the lower CU with a single tree structure may be decoded based on the same prediction mode (e.g., intra prediction mode, IBC, palette mode, inter prediction mode, etc.). In contrast, the luma blocks and chroma blocks of the lower CU with a dual tree structure may be decoded individually based on various combinations of prediction modes. For example, the luma blocks and chroma blocks of the lower CU with a dual tree structure may be decoded using the same prediction mode or different prediction modes.
[0289] In order to distinguish between lower CUs having a single tree structure and lower CUs having a dual tree structure, only luma blocks are shown for lower CUs having a single tree structure, and both luma blocks and chroma blocks are shown for lower CUs having a dual tree structure in Fig. 20. In addition, for lower CUs having a single tree structure, a decoding process will be described based on luma blocks.
[0290] Referring to FIG. 20, the first luma block 1911 having a single tree structure may be decoded using an inter prediction mode. Also, the second luma block 1912 having a single tree structure may be decoded using a palette mode. Also, the fourth luma block 1914 having a single tree structure may be decoded using a palette mode. Differently, the 3-1st luma block 1913-1 having a dual tree structure may be decoded using a palette mode, the 3-2nd luma block 1913-2 may be decoded using an intra mode, and the third chroma block 1923 may be decoded using a palette mode.
[0291] The decoding process for the first to fourth luma blocks 1911 to 1914 may be performed sequentially. Also, the decoding process for the 3-1st luma block 1913-1 and the 3-2nd luma block 1913-2 and the decoding process for the third chroma block 1923 may be performed in parallel or sequentially according to a predetermined order.
[0292] When palette decoding is performed on the second luma block 1912, as described above, one palette predictor may be constructed including palette entries for each of the luma and chroma components and palette indices for identifying the palette entries, and the palette predictor may be updated using the palette entries applied to the second luma block 1912 for the next palette decoding (S2010).
[0293] When palette decoding for the second luma block 1912 is completed, step S201 Using the palette predictor updated with 0, palette decoding for the 3-1st luma block 1913-1 and the 3rd chroma block 1923 can be performed separately.
[0294] The palette predictor for the 3-1-th luma block 1913-1 may include only palette entries for the luma components in the palette predictor updated in step S2010 and palette indices for identifying the palette entries (S2020). The palette predictor for the 3-1-th luma block 1913-1 may be referred to as a luma palette predictor. Then, when palette decoding for the 3-1-th luma block 1913-1 is completed, the luma palette predictor may be updated using the palette entries applied to the 3-1-th luma block 1913-1 (S2030).
[0295] The palette predictor for the third chroma block 1923 may include only palette entries for the chroma components in the palette predictor updated in step S2010 and palette indices for identifying the palette entries (S2040). The palette predictor for the third chroma block 1923 may be referred to as a chroma palette predictor. Then, when palette decoding for the third chroma block 1923 is completed, the chroma palette predictor may be updated using the palette entries applied to the third chroma block 1923 (S2050).
[0296] After decoding for the 3-2-th luma block 1913-2 is performed, palette decoding for the 4th luma block 1914 can be performed.
[0297] A palette predictor for the fourth luma block 1914 may be constructed by combining the luma palette predictor updated in step S2030 and the chroma palette predictor updated in step S2050 (S2060). That is, the palette predictor for the fourth luma block 1914 may include palette entries of the luma components for the 3-1st luma block 1913-1 and palette entries of the chroma components for the 3rd chroma block 1923, and palette indices for identifying the respective palette entries. In this case, the size of the palette predictor for the fourth luma block 1914 (i.e., the number of palette entries) may be determined based on the number of palette entries of the luma components. For example, if the size of the luma palette predictor updated in step S2030 is N (N is an integer greater than 0) and the size of the chroma palette predictor updated in step S2050 is M (M is an integer greater than 0), the size of the palette predictor for the fourth luma block 1914 may be determined as N. Due to this characteristic, a problem may occur in that the palette predictor includes invalid palette entries or does not include valid palette entries. Figures 21 and 22 are diagrams for explaining a problem that occurs when the palette mode is applied to a lower CU having a local dual tree structure in the example of Figure 20.
[0298] 21, the luma palette predictor 2110 updated as a result of palette decoding for the 3-1st luma block 1913-1 having a local dual tree structure may include, for example, nine palette entries (representative color values) for the luma component (e.g., Y component). Also, the chroma palette predictor 2120 updated as a result of palette decoding for the 3rd chroma block 1923 having a dual tree structure may include, for example, two palette entries for each of the chroma components (e.g., Cb component and Cr component).
[0299] Then, after individual palette decoding is performed on the 3-1st luma block 1913-1 and the 3rd chroma block 1923, palette decoding can be performed on the 4th luma block 1914 having a single tree structure. In this case, the 4th luma block 19 The palette predictor 2130 for the fourth luma block 1914 may be constructed by combining the luma palette predictor 2110 and the chroma palette predictor 2120 based on the size of the luma palette predictor 2110. Specifically, since the size of the luma palette predictor 2110 is 9 (e.g., PredictorPaletteSize[0]=9) and the size of the chroma palette predictor 2120 is 2 for each chroma component (e.g., Cb and Cr) (e.g., PredictorPaletteSize[1]=2, PredictorPaletteSize[2]=2), the size of the palette predictor 2130 for the fourth luma block 1914 may be determined to be 9. To satisfy the size determined in this manner, the palette predictor 2130 for the fourth luma block 1914 may include palette entries 2131 having seven NULL values for each chroma component. As a result, unnecessary memory space is wasted for storing palette entries 2131 having NULL values, which may cause a problem of reduced decoding efficiency.
[0300] 22, the luma palette predictor 2210 updated as a result of palette decoding for the 3-1-th luma block 1913-1 having a local dual tree structure may include, for example, three palette entries (representative color values) for the luma component (e.g., Y). Also, the chroma palette predictor 2220 updated as a result of palette decoding for the 3-th chroma block 1923 having a local dual tree structure may include, for example, five palette entries for each chroma component (e.g., Cb and Cr).
[0301] Then, after individual palette decoding for the 3-1th luma block 1913-1 and the 3rd chroma block 1923 is performed, palette decoding for the 4th luma block 1914 having a single tree structure may be performed. In this case, the palette predictor 2230 for the 4th luma block 1914 may be constructed by combining the luma palette predictor 2210 and the chroma palette predictor 2220 based on the size of the luma palette predictor 2210. Specifically, since the size of the luma palette predictor is 3 (e.g., PredictorPaletteSize[0]=3) and the size of the chroma palette predictor 2220 is 5 for each chroma component (e.g., Cb and Cr) (e.g., PredictorPaletteSize[1]=5, PredictorPaletteSize[2]=5), the size of the palette predictor 2230 for the 4th luma block 1914 may be determined to be 3. To meet the determined size, the last two valid palette entries 2221 for each chroma component included in the chroma palette predictor 2220 may be discarded. As a result, an optimal palette table for the fourth luma block 1914 cannot be constructed, which may cause a problem of degraded palette decoding performance for the fourth luma block 1914.
[0302] In order to solve the problems described with reference to Figures 21 and 22, according to an image encoding / decoding method according to an embodiment of the present invention, the process of updating the palette predictor can be skipped or the palette mode can be selectively applied depending on whether the partition structure of the current block is a local dual tree structure or not.
[0303] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0304] Example #1
[0305] According to the embodiment #1 of the present disclosure, when palette encoding / decoding a current block having a local dual tree structure, the process of updating the palette predictor is performed by dividing the current block. This can be done selectively based on the split structure.
[0306] FIG. 23 is a flow chart illustrating a palette encoding method according to one embodiment of the present disclosure.
[0307] The palette coding method of Fig. 23 can be performed by the image coding device of Fig. 2. Specifically, steps S2310 to S2350 may be performed by the intra prediction unit 165, or may be performed by a separate functional block (for example, a palette coding unit) different from the intra prediction unit 165.
[0308] Whether the palette mode is applied to the current block may be determined based on the prediction mode type of the current block. For example, if the prediction mode type of the current block is a first mode type (e.g., MODE_TYPE_ALL) to which intra prediction, IBC (intra block copy), palette mode, and inter prediction are all applicable, the palette mode may be applied to the current block. In contrast, if the prediction mode type of the current block is a second mode type (e.g., MODE_TYPE_INTRA) to which only intra prediction is applicable, or a third mode type (e.g., MODE_TYPE_INTER) to which only inter prediction is applicable, the palette mode may not be applied to the current block. Whether the palette mode is applied to the current block may be signaled using a predetermined flag (e.g., pred_mode_plt_flag). For example, if the palette mode is not applied to the current block, pred_mode_plt_flag having a first value (e.g., 0) may be signaled. Alternatively, if palette mode is applied to the current block, pred_mode_plt_flag having a second value (eg, 1) may be signaled.
[0309] Referring to FIG. 23, if the palette mode is applied to the current block, the image coding apparatus may configure a palette predictor and a palette table for the current block (S2310).
[0310] The palette predictor may include at least one palette entry (representative color value) and a palette index for identifying each palette entry. If the current block is a block that is palette coded first in the current CTU (or slice), the palette predictor may have a predetermined initial value (e.g., 0). In contrast, if the current block is not a block that is palette coded first in the current CTU, the palette predictor may include at least one palette entry used in a palette coding process previous to the current block.
[0311] The image coding device may construct a palette table based on the palette predictor. The palette table may include at least one palette entry selected from the palette predictor and a palette index for identifying each palette entry.
[0312] In one example, the palette predictor and the palette table may be configured differently depending on the color format (or chroma format) of the current block. For example, if the color format of the current block is the monochrome format described above with reference to Table 2, the palette predictor and the palette table may include only palette entries for the luma components of the current block. In contrast, if the color format of the current block is the 4:2:0, 4:2:2, or 4:4:4 format described above with reference to Table 2, the palette predictor and the palette table may include palette entries for the luma components and chroma components of the current block, respectively.
[0313] In one example, the palette predictor and the palette table may be configured in various ways according to the division structure of the current block. For example, if the current block has a single tree structure, the palette predictor and the palette table may have one configuration commonly applied to the luma component and the chroma component of the current block. In contrast, if the current block has a dual tree structure, the palette predictor and the palette table may have multiple configurations individually applied to the luma component and the chroma component of the current block. For example, the palette predictor for the current block may include a luma palette predictor for the luma component and a chroma palette predictor for the chroma component. In this case, the number of palette entries included in the luma palette predictor may be different from the number of palette entries included in the chroma palette predictor.
[0314] The image coding apparatus may generate a palette index map for the current block based on the palette table (S2320).
[0315] The palette index map may refer to a mapping of a predetermined palette index in a palette table to each sample in the current block. For example, a palette index indicating a representative color value may be mapped to a sample having a pixel value that is the same as or similar to a representative color value defined in the palette table among a plurality of samples in the current block. Alternatively, an escape palette index may be mapped to a sample (escape sample) having a pixel value that is not similar to a representative color value defined in the palette table among a plurality of samples in the current block. In one example, whether or not a pixel value of each sample is similar to a representative color value defined in the palette table may be determined based on a predetermined threshold. For example, if a difference between a pixel value and a representative color value of each sample is equal to or smaller than a predetermined threshold, a palette index indicating a representative color value may be mapped to the sample. Alternatively, if a difference between a pixel value and a representative color value of each sample exceeds a predetermined threshold, an escape palette index may be mapped to the sample.
[0316] The image coding apparatus may code the current block based on the palette index map (S2330).
[0317] The encoding process of the current block may be performed by scanning the palette indexes in the palette index map according to a predetermined scanning scheme. Specifically, the image encoding apparatus may determine an encoding mode (palette sample mode) for each of the palette indexes by scanning the palette indexes mapped to the current block according to a predetermined scanning scheme.
[0318] The scan mode for palette coding may include horizontal traverse scan and vertical traverse scan, as described above with reference to FIG. 15. In one example, information on the scan mode may be signaled using palette_transpose_flag. For example, if horizontal traverse scan is used for palette coding of the current block, palette_transpose_flag having a first value (e.g., 0) may be signaled. In contrast, if vertical traverse scan is used for palette coding of the current block, palette_transpose_flag having a second value (e.g., 1) may be signaled.
[0319] A code for encoding each palette index mapped to the current block. The encoding mode may be referred to as a palette sample mode. The palette sample mode may include an "INDEX" mode and a "COPY_ABOVE" mode. If the palette sample mode is determined to be the "INDEX" mode, the value of the palette index may be encoded. In contrast, if the palette sample mode is determined to be the "COPY_ABOVE" mode, the value of the palette index may not be encoded, and information indicating that the palette index has the same value as the palette index present above (in the case of a horizontal traverse scan) or to the left (in the case of a vertical traverse scan) may be encoded. In one example, information regarding the palette sample mode may be signaled using copy_above_palette_indices_flag. For example, if the palette sample mode for the current sample is determined to be the "INDEX" mode, copy_above_palette_indices_flag having a first value (e.g., 0) may be signaled. Alternatively, if the palette sample mode for the current sample is determined to be the 'COPY_ABOVE' mode, copy_above_palette_indices_flag having a second value (eg, 1) may be signaled.
[0320] In addition, in the 'INDEX' mode and the 'COPY_ABOVE' mode, run value information indicating the number of palette indexes consecutively coded using the same palette sample mode can be further coded.
[0321] Meanwhile, in the case of an escape sample, a quantized pixel value of the escape sample may be coded. In one example, whether the current block includes an escape sample may be signaled using an escape sample flag (e.g., palette_escape_val_present_flag). For example, if the current block does not include an escape sample, palette_escape_val_present_flag having a first value (e.g., 0) may be signaled. In contrast, if the current block includes an escape sample, palette_escape_val_present_flag having a second value (e.g., 1) may be signaled.
[0322] The image encoding apparatus may determine whether the partition structure of the current block is a local dual tree structure (S2340).
[0323] In one example, whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to Figures 10a to 10c, if the prediction mode type of the current block is MODE_TYPE_INTRA, in which only intra prediction is applicable, the partition structure of the current block may be a local dual tree structure. In contrast, if the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g., MODE_TYPE_ALL), the partition structure of the current block may be a single tree structure.
[0324] In another example, whether the partition structure of the current block is a local dual tree structure may be determined based on at least one of the tree type (treeType) of the current block and the partition structure of the current CTU. For example, if the tree type of the current block is not a single tree (SINGLE_TREE) and the current CTU is included in a P or B slice or is partitioned into a single tree structure, the partition structure of the current block may be a local dual tree structure. Alternatively, if the tree type of the current block is a single tree (SINGLE_TREE), the partition structure of the current block may be a single tree structure. Or, if the current block is included in an I slice and a CTU included in the slice is implicitly quad-tree partitioned into 64x64 luma sample CUs, the partition structure of the current block may be a local dual tree structure. If the 64×64 luma sample CU is a root node of a dual tree, the partition structure of the current block may be a dual tree structure. Whether the partition structure of the current block is a local dual tree structure may be signaled using LocalDualTreeFlag as shown in Equation 6.
[0325] [Formula 6] LocalDualTreeFlag=(treeType!=SINGLE_TREE&&(sh_slice_type!=I||(sh_slice_type==I&&sps_qtbtt_dual_tree_intra_flag==0)))?1:0
[0326] Referring to Equation 6, sps_qtbtt_dual_tree_intra_flag may indicate a partition structure of the current CTU. For example, sps_qtbtt_dual_tree_intra_flag having a first value (e.g., 0) may indicate that the current block is included in an I slice, and the CTU included in the slice is partitioned into a single tree structure. Differently, sps_qtbtt_dual_tree_intra_flag having a second value (e.g., 1) may indicate that the current block is included in an I slice, and the CTU included in the slice is implicitly quadtree split into 64×64 luma sample CUs, and the 64×64 luma sample CUs become root nodes of a dual tree.
[0327] The value of LocalDualTreeFlag may be determined based on the tree type (treeType), slice type (sh_slice_type) of the current block, and the partition structure (sps_qtbtt_dual_tree_intra_flag) of the current CTU. A first value (e.g., 0) of LocalDualTreeFlag may indicate that the partition structure of the current block is not a local dual tree structure, and a second value (e.g., 1) of LocalDualTreeFlag may indicate that the partition structure of the current block is a local dual tree structure.
[0328] If the partition structure of the current block is not the local dual tree structure ("NO" in S2340), the image encoding apparatus may update the palette predictor using a palette table for the current block (S2350). For example, if the current block is a luma block in a monochrome format, the image encoding apparatus may update the palette predictor. Also, if the current block is a chroma block and the partition structure of the current block is not the local dual tree structure, the image encoding apparatus may update the palette predictor. In contrast, if the current block is a chroma block and the partition structure of the current block is the local dual tree structure, the image encoding apparatus may not update the palette predictor.
[0329] In one example, the image coding device may update the palette predictor by adding at least one palette entry included in a palette table to the palette predictor. The image coding device may also update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table, where the palette entry replaced in the palette predictor may be determined to be the oldest or least frequently used palette entry in a first-in, first-out (FIFO) manner.
[0330] In one example, the update process for the palette predictor can be continued until the palette predictor reaches a maximum size. If the palette predictor has not reached the maximum size, at least one palette entry in the palette predictor that has not been reused in the palette table can be added as a new palette predictor. This can be called palette stuffing. Then, information about the updated palette predictor can be coded and signaled.
[0331] If the partition structure of the current block is a local dual tree structure ("YES" in S2340), the image coding apparatus may skip the step of updating the palette predictor (S2350). In this case, the palette predictor applied to the current block may be applied again to the block that is palette coded next to the current block in the current CTU.
[0332] Meanwhile, although the step of determining whether the partition structure of the current block is a local dual tree structure (S2340) is shown to be performed after the step of encoding the current block (S2330) in Fig. 23, the order of the operations can be changed in various ways. For example, step S2340 can be performed before step S2330, or step S2340 can be performed simultaneously with step S2330.
[0333] FIG. 24 is a diagram for explaining the palette encoding process in the example of FIG. 19 when the palette predictor is not updated.
[0334] 24, in the palette predictor updated in the encoding process (S2410) for the second luma block 1912, palette entries for the luma components may be used for palette encoding of the 3-1th luma block 1913-1 (S2420). Also, in the palette predictor updated in the encoding process (S2410) for the second luma block 1912, palette entries for the chroma components may be used for palette encoding of the 3rd chroma block 1923 (S2430). And, in the palette encoding process for each of the 3-1th luma block 1913-1 and the 3rd chroma block 1923 having the local dual tree structure, the process of updating the palette predictor may be skipped. As a result, for the fourth luma block 1914, which is palette coded next to the third-1 luma block 1913-1 and the third chroma block 1923, the palette predictor updated in the palette coding process for the second luma block 1912 (S2410) can be applied again (S2440).
[0335] FIG. 25 illustrates an example of a process of selectively updating a palette predictor based on a partition structure of a current block.
[0336] Referring to Figure 25, the update operation on the palette entries (PredictorPaletteEntries) that constitute the palette predictor (PredictorPaletteEntries[cIdx][i]) can be performed only when the prediction mode type of the current block is a first mode type (e.g., MODE_TYPE_ALL) to which intra prediction, IBC (intra block copy), palette mode, and inter prediction are all applicable.
[0337] The parameter CurrentPaletteSize[startComp] may indicate the size of the palette table for the current block (ie, the total number of palette entries).
[0338] Parameters startComp, numComps and maxNumPaletteP Each redictorSize value can be set differently depending on the partition tree structure of the current block.
[0339] For example, if the current block has a single tree structure, the values of the parameters startComp, numComps, and maxNumPalettePredictorSize can be set as shown in Equation 7 below.
[0340] [Formula 7] startComp=0 numComps=sps_chroma_format_idc==0?1:3 maxNumPalettePredictorSize=63
[0341] Referring to Equation 7, the first color component startComp of the palette table may be set to 0. Also, the number of total color components numComps of the palette table may be set to 1 if the color format (or chroma format) of the current block is monochrome, and may be set to 3 if the color format of the current block is 4:4:4 format. Also, the maximum size of the palette predictor maxNumPalettePredictorSize may be set to 63.
[0342] Alternatively, if the current block has a dual tree luma structure, the values of the parameters startComp, numComps, and maxNumPalettePredictorSize may be set as shown in Equation 8 below.
[0343] [Formula 8] startComp=0 numComps=1 maxNumPalettePredictorSize=31
[0344] Referring to Equation 8, the first color component startComp of the palette table may be set to 0, the total number of color components numComps of the palette table may be set to 1, and the maximum size of the palette predictor maxNumPalettePredictorSize may be set to 31.
[0345] Also, if the current block has a dual tree chroma structure, the values of the parameters startComp, numComps, and maxNumPalettePredictorSize can be set as shown in Equation 9 below.
[0346] [Formula 9] startComp=1 numComps=2 maxNumPalettePredictorSize=31
[0347] Referring to Equation 9, the first color component startComp of the palette table may be set to 1, the total number of color components numComps of the palette table may be set to 2, and the maximum size of the palette predictor maxNumPalettePredictorSize may be set to 31.
[0348] All palette entries in the palette table can be set to the new palette entries (newPredictorPaletteEntries[cIdx][i] = CurrentPaletteEntries[cIdx][i]), where cIdx can mean a color component, and the size of the palette table for the first color component startComp can be set to the size of the new palette predictor (newPredictorPaletteSize = CurrentPaletteSize[startComp]).
[0349] Then, based on the value of a given reuse flag PalettePredictorEntryReuseFlags[i], at least one palette entry of the palette predictor may be set to a new palette entry (newPredictorPaletteEntries[cIdx][newPredictorPaletteSize] = PredictorPaletteEntries[cIdx][i]), and the size of the new palette predictor may be increased by one (newPredictorPaletteSize++).
[0350] Then, all the new palette entries mentioned above can be set to the palette entries of the new palette predictor (PredictorPaletteEntries[cIdx][i] = newPredictorPaletteEntries[cIdx][i]), and the size of the new palette predictor can be set to the size of the palette predictor for the first color component startComp (newPredictorPaletteSize = PredictorPaletteSize[StartComp]).
[0351] FIG. 26 is a flow chart illustrating a palette decoding method according to one embodiment of the present disclosure.
[0352] The palette decoding method of Fig. 26 can be performed by the image decoding device of Fig. 3. Specifically, steps S2610 to S2660 may be performed by the intra prediction unit 265, or may be performed by a separate functional block (e.g., a palette decoding unit) different from the intra prediction unit 265.
[0353] Referring to FIG. 26, when the palette mode is applied to the current block, the image decoding apparatus may obtain palette information and palette index prediction information for the current block from the bitstream (S2610).
[0354] The palette information may include information about a palette predictor. The palette information may further include information about a new palette entry. In one example, the image decoding apparatus may obtain information about the new palette predictor by decoding PredictorPaletteEntries[cIdx][i] included in the bitstream. In another example, the image decoding apparatus may obtain information about the new palette entry by decoding new_palette_entries[cIdx][i] included in the bitstream. In PredictorPaletteEntries[cIdx][i] and new_palette_entries[cIdx][i], cIdx may represent a color component.
[0355] The palette index prediction information may include information about a palette index map for the current block. In one example, the image decoding apparatus obtains at least one palette index mapped to the current block by decoding PaletteIndexMap[xC][yC] included in the bitstream. Here, xC and yC may be coordinate indicators indicating a relative position of the current sample from the upper left sample of the CTU (or slice) to which the current block belongs. In one example, the image decoding apparatus can obtain run value information of palette indices included in the palette index map by decoding PaletteRunMinus1 included in the bitstream.
[0356] The image decoding apparatus may construct a palette predictor and a palette table for the current block based on the palette information obtained from the bitstream (S2620).
[0357] In one example, the image decoding apparatus may configure a palette predictor for the current block based on PredictorPaletteEntries[cIdx][i] included in the bitstream. The palette predictor may have a predetermined value (e.g., 0) initialized at the time of the first decoding of the CTU (or slice) including the current block. Alternatively, the palette predictor may have the same configuration as the palette predictor updated in the previous palette decoding process.
[0358] The image decoding apparatus may construct a palette table for the current block based on the palette predictor. The palette table may include at least one of palette entries included in the palette predictor and new palette entries obtained from the bitstream, and a palette index for identifying each palette entry.
[0359] In one example, the palette predictor and the palette table can be configured differently depending on the color format (or chroma format) of the current block. For example, the palette predictor and the palette table can include only palette entries for the luma component or all palette entries for the luma component and each of the chroma components depending on the color format of the current block.
[0360] In one example, the palette predictor and the palette table may be configured in various ways depending on the division structure of the current block. For example, if the current block has a single tree structure, the palette predictor and the palette table may have a single configuration commonly applied to the luma component and the chroma component of the current block. In contrast, if the current block has a dual tree structure, the palette predictor and the palette table may have multiple configurations separately applied to each of the luma component and the chroma component of the current block.
[0361] The image decoding apparatus may generate a palette index map for the current block based on the palette index prediction information obtained from the bitstream (S2630). Specifically, the image decoding apparatus may generate the palette index map by mapping a palette index to each sample in the current block according to a predetermined scanning scheme using the palette index, palette sample mode, and run value of the palette sample mode obtained from the bitstream.
[0362] The scan mode for palette decoding may include horizontal traverse scan and vertical traverse scan as described above with reference to FIG. 15. In one example, the scan mode for palette decoding may be determined by decoding palette_transpose_flag included in the bitstream. For example, when palette_transpose_flag is a first value (e.g., , 0), the scan mode for palette decoding may be determined as horizontal traverse scan. Conversely, if palette_transpose_flag has a second value (e.g., 1), the scan mode for palette decoding may be determined as vertical traverse scan.
[0363] The palette sample mode may include the 'INDEX' mode and the 'COPY_ABOVE' mode as described above. When the 'INDEX' mode is applied to the current sample, the value of the palette index mapped to the current sample may be directly obtained from the bitstream. On the other hand, when the 'COPY_ABOVE' mode is applied to the current sample, the value of the palette index mapped to the current sample may be determined as the value of the palette index mapped to the neighboring sample located above (in the case of horizontal traverse scan) or to the left (in the case of vertical traverse scan) of the current sample.
[0364] On the other hand, if the current sample is an escape sample, the quantized pixel value of the current sample may be obtained directly from the bitstream, and an escape palette index may be mapped to the escape sample.
[0365] The image decoding apparatus may decode the current block based on the palette table and the palette index map for the current block (S2640). Specifically, the image decoding apparatus may generate a prediction block for the current block by inverse mapping the values of each palette index in the palette index map to representative color values with reference to the palette table.
[0366] Then, the image decoding apparatus may determine whether the current block has a local dual tree structure (S2650).
[0367] In one example, whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to Figures 10a to 10c, if the prediction mode type of the current block is MODE_TYPE_INTRA, in which only intra prediction is applicable, the partition structure of the current block may be a local dual tree structure. In contrast, if the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g., MODE_TYPE_ALL), the partition structure of the current block may be a single tree structure.
[0368] In another example, whether the partition structure of the current block is a local dual tree structure may be determined based on at least one of the tree type (treeType) of the current block and the partition structure of a CTU (current CTU) including the current block. For example, if the tree type of the current block is not a single tree (SINGLE_TREE) and the current CTU is partitioned into a single tree structure, the partition structure of the current block may be a local dual tree structure. Alternatively, if the tree type of the current block is a single tree (SINGLE_TREE), the partition structure of the current block may be a single tree structure. Alternatively, if the current block is included in an I slice, a CTU included in the slice is implicitly quadtree split into 64×64 luma sample CUs, and the 64×64 luma sample CUs become root nodes of a dual tree, the partition structure of the current block may be a dual tree structure. Whether the partition structure of the current block is a local dual tree structure may be determined by decoding the LocalDualTreeFlag described above with reference to Equation 6. For example, if LocalDualTreeFlag has the first value (e.g., 0), In this case, the partition structure of the current block may be determined to be a single tree structure or a dual tree structure. Alternatively, if the LocalDualTreeFlag has a second value (e.g., 1), the partition structure of the current block may be determined to be a local dual tree structure.
[0369] If the partition structure of the current block is not the local dual tree structure ("NO" in S2650), the image decoding apparatus may update the palette predictor using a palette table for the current block (S2660). For example, if the current block is a luma block in monochrome format, the image decoding apparatus may update the palette predictor. Also, if the current block is a chroma block and the partition structure of the current block is not the local dual tree structure, the image decoding apparatus may update the palette predictor. In contrast, if the current block is a chroma block and the partition structure of the current block is the local dual tree structure, the image decoding apparatus may not update the palette predictor.
[0370] In one example, the image decoding apparatus may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor. The image decoding apparatus may also update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table. In this case, the palette entry replaced by the palette predictor may be determined to be the oldest palette entry or the least frequently used palette entry in a first-in, first-out (FIFO) manner.
[0371] In one example, the update process for the palette predictor can continue until the palette predictor reaches a maximum size. If the palette predictor has not reached a maximum size, at least one palette entry in the palette predictor that has not been reused in the palette table can be added as a new palette predictor. This can be referred to as palette stuffing.
[0372] In one example, the image decoding device may also update the palette predictor based on update information for the palette predictor signaled from the image coding device.
[0373] If the partition structure of the current block is a local dual tree structure ("YES" in S2650), the image decoding apparatus may skip the step of updating the palette predictor (S2660). In this case, the palette predictor applied to the current block may be applied again to the block that is palette decoded next to the current block in the current CTU.
[0374] As described above, according to the embodiment #1 of the present disclosure, when the partition structure of the current block is a local dual tree structure, the process of updating the palette predictor applied to the current block can be skipped, thereby solving the problem that the palette predictor for the block to be palette encoded / decoded next to the current block does not include a valid palette entry applied to the current block or includes an invalid palette entry.
[0375] Example #2
[0376] According to embodiment #2 of the present disclosure, when encoding / decoding a current block having a local dual tree structure, the palette mode can be selectively applied based on the partition structure of the current block.
[0377] FIG. 27 is a flow chart illustrating a palette encoding method according to one embodiment of the present disclosure.
[0378] The palette coding method of Fig. 27 can be performed by the image coding device of Fig. 2. Specifically, S2710 to S2760 may be performed by the intra prediction unit 165, or may be performed by a separate functional block (e.g., a palette coding unit) different from the intra prediction unit 165. Meanwhile, S2720 to S2750 of Fig. 27 can correspond to S2310 to S2330 and S2350 of Fig. 23, respectively. Therefore, the description of S2720 to S2750 will be brief.
[0379] Referring to FIG. 27, the image encoding apparatus may determine whether the partition structure of the current block is a local dual tree structure (S2710).
[0380] In one example, whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to Figures 10a to 10c, if the prediction mode type of the current block is MODE_TYPE_INTRA, in which only intra prediction is applicable, the partition structure of the current block may be a local dual tree structure. In contrast, if the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g., MODE_TYPE_ALL), the partition structure of the current block may be a single tree structure.
[0381] In another example, whether the partition structure of the current block is a local dual tree structure may be determined based on at least one of the tree type (treeType) of the current block and the partition structure of the current CTU. For example, if the tree type of the current block is not a single tree (SINGLE_TREE) and the current CTU is included in a P or B slice or is partitioned into a single tree structure, the partition structure of the current block may be a local dual tree structure. Alternatively, if the tree type of the current block is a single tree (SINGLE_TREE), the partition structure of the current block may be a single tree structure. Alternatively, if the current block is included in an I slice, and a CTU included in the slice is implicitly quadtree split into 64×64 luma sample CUs, and the 64×64 luma sample CUs become root nodes of a dual tree, the partition structure of the current block may be a dual tree structure. Whether the partition structure of the current block is a local dual tree structure may be signaled using LocalDualTreeFlag described above with reference to Equation 6. In this case, a first value of LocalDualTreeFlag (e.g., 0) may indicate that the partition structure of the current block is not a local dual tree structure, and a second value of LocalDualTreeFlag (e.g., 1) may indicate that the partition structure of the current block is a local dual tree structure.
[0382] If the partitioning structure of the current block is not a local dual tree structure ("NO" in S2710), the image encoding device may decide to apply palette mode to the current block and construct a palette predictor and palette table for the current block (S2720).
[0383] The palette predictor may include at least one palette entry (representative color value) and a palette index for identifying each palette entry. If the current block is a block that is palette coded first in the current CTU (or slice), the palette predictor may have a predetermined initial value (e.g., 0). In contrast, if the current block is not a block that is palette coded first in the current CTU, the palette predictor may be a value that is used in a palette coding process prior to the current block in the current CTU. It may also contain at least one palette entry.
[0384] The image coding apparatus may construct a palette table based on the palette predictor, the palette table including at least one palette entry selected from the palette predictor and a palette index for identifying each palette entry.
[0385] In one example, the palette predictor and the palette table may be configured differently depending on the color format (or chroma format) of the current block. For example, if the color format of the current block is the monochrome format described above with reference to Table 2, the palette predictor and the palette table may include only palette entries for the luma components of the current block. In contrast, if the color format of the current block is the 4:2:0, 4:2:2, or 4:4:4 format described above with reference to Table 2, the palette predictor and the palette table may include palette entries for the luma components and chroma components of the current block, respectively.
[0386] In one example, the palette predictor and the palette table may be configured in various ways depending on the division structure of the current block. For example, if the current block has a single tree structure, the palette predictor and the palette table may have one configuration commonly applied to the luma component and the chroma component of the current block. In contrast, if the current block has a dual tree structure, the palette predictor and the palette table may have multiple configurations individually applied to the luma component and the chroma component of the current block.
[0387] The image encoding apparatus can generate a palette index map for the current block based on the palette table (S2730). Specifically, the image encoding apparatus can generate the palette index map by mapping a palette index to each pixel in the current block based on whether the pixel value of each pixel (sample) in the current block is the same as or similar to a representative color value in the palette table.
[0388] The image coding apparatus may code the current block based on the palette index map (S2740).
[0389] The encoding process of the current block may be performed by scanning the palette indexes in the palette index map according to a predetermined scanning scheme. Specifically, the image encoding apparatus may determine an encoding mode (palette sample mode) for each of the palette indexes by scanning the palette indexes mapped to the current block according to a predetermined scanning scheme.
[0390] The scanning scheme for palette coding may include horizontal traverse scan and vertical traverse scan as described above with reference to Fig. 15. In one example, information regarding the scanning scheme may be signaled using palette_transpose_flag.
[0391] The palette sample mode for encoding each palette index included in the palette index map may include an "INDEX" mode and a "COPY_ABOVE" mode. When the palette sample mode is determined to be the "INDEX" mode, the value of the corresponding palette index may be encoded. In contrast, when the palette sample mode is determined to be the "COPY_ABOVE" mode, the value of the corresponding palette index may be encoded. The value of the palette index is not coded, and information indicating that the palette index has the same value as the palette index located above (in the case of a horizontal traverse scan) or to the left (in the case of a vertical traverse scan) may be coded. In one example, information regarding the palette sample mode may be signaled using copy_above_palette_indices_flag.
[0392] In addition, in the 'INDEX' mode and the 'COPY_ABOVE' mode, run value information indicating the number of palette indexes consecutively coded using the same palette sample mode can be further coded.
[0393] Meanwhile, information indicating whether the palette index map includes an escape palette index may be signaled using an escape sample flag (e.g., palette_escape_val_present_flag). For a sample (escape sample) to which an escape palette index is mapped, a quantized pixel value of the sample may be coded and signaled.
[0394] The image coding apparatus may update the palette predictor using the palette table for the current block (S2750). For example, the image coding apparatus may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor. The image coding apparatus may also update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table. The palette entry to be replaced in the palette predictor may be determined to be the oldest palette entry or the least frequently used palette entry in a first-in-first-out (FIFO) manner.
[0395] The update process for the palette predictor may continue until the palette predictor reaches the maximum palette size. For example, the palette predictor may be updated by palette stuffing until the maximum palette size is reached.
[0396] If the partition structure of the current block is a local dual tree structure ("YES" in S2710), the image encoding device may not apply the palette mode to the current block, and may encode the current block using a normal prediction mode other than the palette mode (e.g., intra prediction mode, inter prediction mode, etc.) (S2760). Specific details regarding the normal prediction mode are as described above with reference to FIGS. 1 to 14.
[0397] Meanwhile, information regarding whether the palette mode is applied to the current block can be signaled using a palette mode flag (eg, pred_mode_plt_flag).
[0398] FIG. 28 is a diagram showing a specific example of a coding_unit syntax including a palette mode flag.
[0399] 28, pred_mode_plt_flag may indicate whether or not the palette mode is applied to the current block (or the current CU). For example, pred_mode_plt_flag having a first value (e.g., 0) may indicate that the palette mode is not applied to the current block. In contrast, pred_mode_plt_flag having a second value (e.g., 1) may indicate that the palette mode is applied to the current block.
[0400] In one example, pred_mode_plt_flag may be signaled based on the prediction mode type of the current block. For example, when the prediction mode type of the current block is a first mode type (e.g., MODE_TYPE_ALL) to which intra prediction, IBC (intra block copy), palette mode, and inter prediction are all applicable, pred_mode_plt_flag may be signaled. In contrast, when the prediction mode type of the current block is a second mode type (e.g., MODE_TYPE_INTRA) to which only intra prediction is applicable, or a third mode type (e.g., MODE_TYPE_INTER) to which only inter prediction is applicable, pred_mode_plt_flag may not be signaled.
[0401] FIG. 29 is a flow chart illustrating a palette decoding method according to one embodiment of the present disclosure.
[0402] The palette decoding method of Fig. 29 can be performed by the image decoding device of Fig. 3. Specifically, steps S2910 to S2980 may be performed by the intra prediction unit 265, or may be performed by a separate functional block (e.g., a palette decoding unit) different from the intra prediction unit 265. Meanwhile, S2930 to S2970 of Fig. 29 can correspond to S2610 to S2640 and S2660 of Fig. 26, respectively. Therefore, the description of S2930 to S2970 will be brief.
[0403] Referring to FIG. 29, the image decoding apparatus may determine whether the partition structure of the current block is a local dual tree structure (S2910).
[0404] In one example, whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to Figures 10a to 10c, if the prediction mode type of the current block is MODE_TYPE_INTRA, in which only intra prediction is applicable, the partition structure of the current block may be a local dual tree structure. In contrast, if the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g., MODE_TYPE_ALL), the partition structure of the current block may be a single tree structure.
[0405] In another example, whether the partition structure of the current block is a local dual tree structure may be determined based on at least one of the tree type of the current block and the partition structure of the current CTU. For example, if the tree type of the current block is not a single tree SINGLE_TREE and the current CTU is included in a P or B slice or is partitioned into a single tree structure, the partition structure of the current block may be a local dual tree structure. Alternatively, if the tree type of the current block is a single tree SINGLE_TREE, the partition structure of the current block may be a single tree structure. Alternatively, if the current block is included in an I slice and a CTU included in the slice is implicitly quadtree split into 64×64 luma sample CUs, and the 64×64 luma sample CUs become root nodes of a dual tree, the partition structure of the current block may be a dual tree structure. Whether the partition structure of the current block is a local dual tree structure may be signaled using LocalDualTreeFlag described above with reference to Equation 6. In this case, a first value of LocalDualTreeFlag (e.g., 0) may indicate that the partition structure of the current block is not a local dual tree structure, and a second value of LocalDualTreeFlag (e.g., 1) may indicate that the partition structure of the current block is a local dual tree structure.
[0406] If the current block division structure is not a local dual tree structure (see " When the pred_mode_plt_flag flag is set to "NO", the image decoding apparatus may determine whether the palette mode is applied to the current block. In one example, the image decoding apparatus may determine whether the palette mode is applied to the current block based on a palette mode flag (e.g., pred_mode_plt_flag) obtained from the bitstream. For example, when pred_mode_plt_flag described above with reference to FIG. 28 has a first value (e.g., 0), the palette mode may not be applied to the current block. In contrast, when pred_mode_plt_flag has a second value (e.g., 1), the palette mode may be applied to the current block. On the other hand, when pred_mode_plt_flag is not obtained from the bitstream, it can be inferred that the value of pred_mode_plt_flag has the first value.
[0407] If the palette mode is applied to the current block ("YES" in S2920), the image decoding apparatus may obtain palette information and palette index prediction information for the current block from the bitstream (S2930). The palette information may include information on a palette predictor and / or a new palette entry. The palette index prediction information may include palette indexes mapped to the current block and run value information of the palette indexes.
[0408] The image decoding apparatus may configure a palette predictor and a palette table for the current block based on the palette information acquired from the bitstream (S2940). In one example, the palette predictor may have the same configuration as the palette predictor updated in the previous palette decoding process of the current block. On the other hand, if information on the palette predictor is not acquired from the bitstream, the palette predictor may have a predetermined initial value (e.g., 0) or may have the same configuration as the palette predictor used in the previous palette decoding process.
[0409] The image decoding apparatus may construct a palette table for a current block based on the palette predictor, the palette table including at least one of palette entries included in the palette predictor and new palette entries obtained from the bitstream, and a palette index for identifying each palette entry.
[0410] In one example, the palette predictor and the palette table may be configured differently depending on the color format (or chroma format) of the current block, and the palette predictor and the palette table may be configured differently depending on the partition structure of the current block.
[0411] The image decoding apparatus may generate a palette index map for the current block based on the palette index prediction information (S2950). Specifically, the image decoding apparatus may generate the palette index map by mapping a palette index to each sample in the current block according to a predetermined scanning scheme using a palette index, a palette sample mode, and a run value of the palette sample mode obtained from the bitstream.
[0412] The scan scheme for palette decoding may include horizontal traverse scan and vertical traverse scan, as described above with reference to FIG. 15. In one example, the scan scheme for palette decoding may be determined by decoding palette_transpose_flag included in the bitstream. For example, if palette_transpose_flag has a first value (e.g., 0), the scan scheme for palette decoding may be determined as horizontal traverse scan. Alternatively, if palette_transpose_flag has a second value (eg, 1), the scan mode for palette decoding can be determined as vertical traverse scan.
[0413] As described above, the palette sample mode can include the 'INDEX' mode and the 'COPY_ABOVE' mode. When the 'INDEX' mode is applied to the current sample, the value of the palette index mapped to the current sample can be directly obtained from the bitstream. On the other hand, when the 'COPY_ABOVE' mode is applied to the current sample, the value of the palette index mapped to the current sample can be determined as the value of the palette index mapped to the neighboring sample present above (in the case of horizontal traverse scan) or to the left (in the case of vertical traverse scan) of the current sample.
[0414] On the other hand, if the current sample is an escape sample, the quantized pixel value of the current sample can be obtained directly from the bitstream. An escape palette index can be mapped to the escape sample.
[0415] The image decoding apparatus may decode the current block based on the palette table and the palette index map for the current block (S2960). Specifically, the image decoding apparatus may generate a prediction block for the current block by inverse mapping the values of each palette index in the palette index map to representative color values with reference to the palette table.
[0416] The image decoding apparatus may update the palette predictor using the palette table for the current block (S2970). For example, the image decoding apparatus may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor. The image decoding apparatus may also update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table.
[0417] Updates to the palette predictor may continue until the palette predictor reaches the maximum palette size. For example, the palette predictor may be updated by palette stuffing until the maximum palette size is reached.
[0418] In one example, the image decoding device may also update the palette predictor based on update information for the palette predictor signaled from the image coding device.
[0419] If the partition structure of the current block is a local dual tree structure ('YES' in S2910), the image decoding apparatus may decode the current block using a normal prediction mode other than the palette mode (e.g., intra prediction mode, inter prediction mode, etc.) without applying the palette mode to the current block (S2980). Specific details regarding the normal prediction mode are as described above with reference to Figures 1 to 14. In this case, a palette predictor initialized to a predetermined value (e.g., 0) may be applied to a block that is palette decoded after the current block in the current CTU, or the palette predictor applied to the current block may be applied again.
[0420] As described above, according to the embodiment #2 of the present disclosure, when the division structure of the current block is a local dual tree structure, the current block uses a normal prediction mode other than the palette mode. This also skips the process of updating the palette predictor, which solves the problem that the palette predictor does not contain valid palette entries or contains invalid palette entries.
[0421] 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, or some steps may be omitted but the remaining steps may be included, or some steps may be omitted but additional other steps may be included.
[0422] 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.
[0423] 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.
[0424] 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.
[0425] 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.
[0426] FIG. 30 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.
[0427] As shown in FIG. 30, 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.
[0428] 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, camcorder, etc. directly generates a bitstream, the encoding server can be omitted.
[0429] 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.
[0430] 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. In this case, 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.
[0431] 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.
[0432] 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 (e.g., smartwatches, smart glasses, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, and the like.
[0433] 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.
[0434] 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]
[0435] The embodiments according to the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, comprising: obtaining palette information and palette index prediction information of the current block from the bitstream based on a palette mode applied to the current block; constructing a palette predictor for the current block based on the palette information, and constructing a palette table for the current block based on the palette predictor; generating a palette index map for the current block based on the palette index prediction information; decoding the current block based on the palette table and the palette index map; Whether the palette predictor is updated is determined based on whether a partition structure of the current block is a local dual tree structure; The local dual tree structure is a partitioning structure in which additional partitioning is performed only on luma blocks in a coding tree unit (CTU) partitioned in the single tree structure.
2. The image decoding method of claim 1 , wherein if the current block is a chroma block and the partition structure of the current block is the local dual tree structure, the palette predictor is not updated.
3. The image decoding method according to claim 2 , wherein whether or not the partition structure of the current block is the local dual tree structure is determined based on at least one of a tree type of the current block and a partition structure of the CTU including the current block.
4. The image decoding method according to claim 1 , wherein if the current block is a chroma block and a partition structure of the current block is not the local dual tree structure, the palette predictor is updated based on the palette table.
5. The image decoding method of claim 4 , wherein the updated palette predictor comprises at least one palette entry contained in the palette table.
6. The image decoding method of claim 4 , wherein the updated palette predictor includes at least one new palette entry not included in the palette table.
7. The image decoding method of claim 1, wherein whether or not the palette mode is applied to the current block is determined based on a prediction mode type of the current block.
8. 8. The image decoding method of claim 7, wherein, when a prediction mode type of the current block is a first mode type to which intra prediction, intra block copy (IBC), palette mode, and inter prediction are all applicable, the palette mode is applied to the current block.
9. The image decoding method according to claim 7 , wherein, when a prediction mode type of the current block is a second mode type to which only intra prediction is applicable, the palette mode is not applied to the current block.
10. An image coding method performed by an image coding device, comprising: if a palette mode applies to the current block, constructing a palette predictor for the current block, and constructing a palette table for the current block based on the palette predictor; generating a palette index map for the current block based on the palette table; encoding the current block based on the palette index map; Whether the palette predictor is updated is determined based on whether a partition structure of the current block is a local dual tree structure; The local dual tree structure is a partitioning structure in which additional partitioning is performed only on luma blocks in a coding tree unit (CTU) partitioned in the single tree structure.
11. The image encoding method of claim 10 , wherein if the current block is a chroma block and the partition structure of the current block is the local dual tree structure, the palette predictor is not updated.
12. The image encoding method of claim 10 , wherein if the current block is a chroma block and the partition structure of the current block is not the local dual tree structure, the palette predictor is updated based on the palette table.
13. The image encoding method of claim 10, wherein whether or not the palette mode is applied to the current block is determined based on a prediction mode type of the current block.
14. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: The image encoding method includes: if a palette mode applies to the current block, constructing a palette predictor for the current block, and constructing a palette table for the current block based on the palette predictor; generating a palette index map for the current block based on the palette table; encoding the current block based on the palette index map; Whether the palette predictor is updated is determined based on whether a partition structure of the current block is a local dual tree structure; The local dual tree structure is a partitioning structure in which additional partitioning is performed only on luma blocks in a coding tree unit (CTU) partitioned in a single tree structure.
