Entropy encoding and decoding for palette escape symbols

By using fixed-length codec and quantization adjustment methods in video encoding and decoding technology, the escaped symbols in the palette mode are optimized and coded, which solves the problems of low encoding and decoding efficiency and redundancy in the prior art, and achieves more efficient video processing and decoding.

CN114930822BActive Publication Date: 2025-05-16DOUYIN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080058676.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-01-09
Filing Date
2020-08-15
Publication Date
2025-05-16
Estimated Expiration
2040-08-15

AI Technical Summary

Technical Problem

In the existing video encoding and decoding technology, the escape symbol encoding and decoding in palette mode encoding and decoding is inefficient, and there are problems of redundancy and parsing difficulties under the combination of local double tree and PLT mode.

Method used

Fixed-length codec is used to encode and decode the escaped symbols, and the quantization and inverse quantization processes are applied in video processing, and the encoding and decoding efficiency is optimized by adjusting the quantization parameters and the application of the inverse quantization process.

Benefits of technology

It improves the efficiency and quality of video encoding and decoding, reduces redundancy and parsing difficulties, and enhances the encoding and decoding performance in local dual-tree and PLT modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114930822B_ABST
    Figure CN114930822B_ABST
Patent Text Reader

Abstract

Methods, systems, and devices for performing entropy encoding and decoding of palette escape symbols in palette mode encoding and decoding are described. An exemplary method for video processing includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to format rules for encoding and decoding the current video block using a palette mode codec, wherein binarization of the escape symbols of the current video block uses a K-order Exponential Golomb (EG) code, wherein K is a non-negative integer not equal to three, and wherein the palette mode codec represents that the current video block uses a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] Pursuant to applicable patent law and / or in accordance with the provisions of the Paris Convention, this application timely claims priority to and benefits of International Patent Application PCT / CN2019 / 100850 filed on August 15, 2019, International Patent Application PCT / CN2019 / 106700 filed on September 19, 2019, International Patent Application PCT / CN2019 / 107494 filed on September 24, 2019, International Patent Application PCT / CN2019 / 108736 filed on September 27, 2019, International Patent Application PCT / CN2019 / 109793 filed on October 1, 2019, International Patent Application PCT / CN2019 / 113931 filed on October 29, 2019, and International Patent Application PCT / CN2020 / 071221 filed on January 9, 2020. The entire disclosure of the above application is incorporated by reference as a part of the disclosure of the present application for all purposes as provided by law. Technical Field

[0003] This document deals with video and image encoding and decoding techniques. Background Art

[0004] Digital video accounts for the largest amount of bandwidth usage on the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, bandwidth demand for digital video usage is expected to continue to grow. Summary of the invention

[0005] The disclosed techniques may be used by video or image decoder or encoder embodiments to perform entropy encoding and decoding of palette escape symbols in palette mode encoding and decoding.

[0006] In one exemplary aspect, a video processing method is disclosed. The method includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec, wherein binarization of escape symbols of the current video block uses a K-order Exponential Golomb (EG) code, wherein K is a non-negative integer not equal to three, and wherein the palette mode codec represents the current video block using a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[0007] In another exemplary aspect, a method of video processing is disclosed. The method includes: performing conversion between a video including one or more video regions including one or more video blocks and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding a current video block of the one or more video blocks using a palette mode codec, wherein binarization of escape symbols for the current video block uses fixed length binarization, wherein the palette mode codec represents the current video block using a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[0008] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec, wherein binarization of escape symbols of the current video block uses a variable length codec, wherein the palette mode codec represents that the current video block uses a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[0009] In yet another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the conversion includes applying a quantization and an inverse quantization process to the current video block, wherein the bitstream representation complies with a format rule, the format rule configuring application of the quantization or inverse quantization process based on whether the current video block is encoded using a palette mode codec, and wherein the palette mode codec represents the current video block using a palette of representative color values.

[0010] In yet another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing the current video block encoded and decoded using a palette mode codec tool so as to quantize and / or inverse quantize escape symbols of the current video block using a binary shift operation, wherein the palette mode codec tool represents the current video block using a palette having representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded and decoded using the representative color values.

[0011] In yet another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to format rules for encoding and decoding the current video block using a palette mode codec, wherein one or more palette indexes of the palette mode codec are encoded and decoded without using reference indexes, and wherein the palette mode codec represents the current video block using a palette of representative color values.

[0012] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec and constraining derivation between indices of escape symbols and indices of non-escape symbols, wherein the palette mode codec represents the current video block using a palette with representative color values, and wherein escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[0013] In yet another exemplary aspect, a method of video processing is disclosed. The method includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec, wherein a derived palette index of the palette mode codec has a maximum value, and wherein the palette mode codec represents the current video block using a palette of representative color values.

[0014] In yet another exemplary aspect, a method of video processing is disclosed. The method includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for using a syntax element including an escape symbol to represent the current video block encoded using a palette mode codec, wherein a value of an index indicating the escape symbol is not changed for each of the one or more video regions, wherein the palette mode codec represents the current video block using a palette with representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded using the representative color values.

[0015] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec using syntax elements encoded based on a current index and a reference index, wherein the palette mode codec represents the current video block using a palette of representative color values.

[0016] In yet another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec using syntax elements including escape symbols that are predictively encoded, wherein the palette mode codec represents the current video block using a palette having representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[0017] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec tool using a syntax element for run-length encoding with a context based on a palette index for indexing a palette entry, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[0018] In yet another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec using a syntax element including a current palette index that is independent of previous palette index signaling, wherein the palette mode codec represents the current video block using a palette of representative color values.

[0019] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: determining, based on an alignment rule, a first neighboring video block for predicting a quantization parameter of a current video block of one or more video regions of a video and a second neighboring video block for predictively determining a codec mode of the current video block; and performing conversion between the video and a bitstream representation of the video based on the determination.

[0020] In yet another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule that uses syntax elements including a block-level quantization parameter (QP) difference to represent the current video block encoded using a palette mode codec tool regardless of whether the current video block includes an escape symbol, wherein the palette mode codec tool represents the current video block using a palette having representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded using the representative color values.

[0021] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec using syntax elements including one or more codec block flags (CBFs) for a palette section, wherein the palette mode codec represents the current video block using a palette of representative color values.

[0022] In yet another exemplary aspect, a method of video processing is disclosed. The method includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of using a syntax element including one or more palette indices to represent the current video block encoded and decoded using a palette mode codec, wherein the number of the one or more palette indices (NumPltIdx) is greater than or equal to K, wherein the palette mode codec represents the current video block using a palette of representative color values, and wherein K is a positive integer.

[0023] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule that uses a syntax element based on a maximum size of a palette of the current block, a size of the current video block, use of a lossless mode, or a quantization parameter (QP) to represent the current video block encoded using a palette mode codec, wherein the palette mode codec represents the current video block using a palette of representative color values.

[0024] In yet another exemplary aspect, a method of video processing is disclosed. The method includes: determining, for conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, to encode and decode the current video block using a block-based differential pulse codec modulation (BDPCM) mode and to divide the current video block into a plurality of transform blocks or sub-blocks; and based on the determination, as part of performing the conversion, performing residual prediction at a block level and including one or more residuals into the bitstream representation at a sub-block or transform block level.

[0025] In yet another exemplary aspect, a method of video processing is disclosed, the method comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a line-based coefficient group (CG) palette mode, wherein the line-based CG palette mode represents a palette of representative color values ​​used by multiple fragments of each codec unit (CU) of the current video block.

[0026] In yet another exemplary aspect, the above method may be implemented by a video encoder device comprising a processor.

[0027] In yet another exemplary aspect, the above method may be implemented by a video decoder device comprising a processor.

[0028] In yet another exemplary aspect, the methods may be embodied in the form of processor-executable instructions and stored on a computer-readable program medium.

[0029] These and other aspects are described further herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 An example of a block encoded and decoded in palette mode is shown.

[0031] Figure 2 An example of signaling palette entries using a palette predictor is shown.

[0032] Figure 3 Examples of horizontal and vertical traversal scans are shown.

[0033] Figure 4 An exemplary encoding and decoding of a palette index is shown.

[0034] Figure 5A and Figure 5B An example of a minimum chroma intra prediction unit (SCIPU) is shown.

[0035] Figure 6 A block diagram illustrating an example of in-loop filtering in video processing.

[0036] Figure 7 An example of duplicate palette entries in the local dual-tree case is shown.

[0037] Figure 8 An example of the left block and the upper block in the context derivation process is shown.

[0038] Fig. 9 is a block diagram of an example of a hardware platform for implementing the techniques described in this document.

[0039] Fig.10 is a block diagram of an exemplary video processing system in which the disclosed technology may be implemented.

[0040] Fig.11 is a block diagram illustrating a video encoding system according to some embodiments of the present disclosure.

[0041] Fig.12 is a block diagram illustrating an encoder according to some embodiments of the present disclosure.

[0042] Fig.13 is a block diagram illustrating a decoder according to some embodiments of the present disclosure.

[0043] Figure 14-33 A flow chart illustrating an exemplary method of video processing is shown. DETAILED DESCRIPTION

[0044] This document provides various techniques that can be used by decoders of image or video bitstreams to improve the quality of decompressing or decoding digital video or images. For the sake of brevity, the term "video" is used herein to include both sequences of pictures (conventionally referred to as video) and individual images. In addition, video encoders can also implement these techniques during the encoding process to reconstruct decoded frames for further encoding.

[0045] The section headings used in this document are intended to facilitate understanding, but not to limit the embodiments and techniques to the corresponding sections. As such, embodiments from one section can be combined with embodiments from other sections.

[0046] 1. Overview

[0047] This document relates to video coding techniques. Specifically, this document relates to index and escape symbol coding in palette coding. It can be applied to existing video codec standards, such as HEVC, or to a pending standard (Versatile Video Codec). It can also be applied to future video codec standards or video codecs.

[0048] 2. Background

[0049] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Vision, and the two organizations jointly developed the H.262 / MPEG-2 Video, H.264 / MPEG-4 Advanced Video Coding (AVC), and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec structure that uses temporal prediction plus transform codecs. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new approaches and applied them to reference software called the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Team (JVET) was created between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) to work on the VVC standard with the goal of a 50% bitrate reduction compared to HEVC.

[0050] The latest version of the VVC draft, Versatile Video Codec (Draft 6), can be found at:

[0051] http: / / phenix.it-sudparis.eu / jvet / doc_end_user / documents / 15_Gothenburg / wg11 / JVET-O2001-v14.zip

[0052] The latest reference software for VVC, called VTM, can be found at the following URL:

[0053] https: / / vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM / tags / VTM-5.0

[0054] 2.1 Palette Mode in HEVC Screen Content Codec Extension (HEVC-SCC)

[0055] 2.1.1 Concept of Palette Mode

[0056] The basic idea behind the palette mode is to represent pixels in a CU by a small set of representative color values. This set is called the palette. And it is also possible to indicate samples outside the palette by signaling an escape symbol and then a (possibly quantized) component value. Such pixels are called escape pixels. Figure 1 The palette mode is illustrated in Figure 1As shown in , for each pixel having three color components (a luma component and two chroma components), an index to a palette is found, and the block can be reconstructed based on the values ​​found in the palette.

[0057] 2.1.2 Encoding of Palette Entries

[0058] In order to encode and decode the palette entries, a palette predictor is maintained. The maximum size of the palette as well as the palette predictor is signaled in the SPS. In HEVC-SCC, palette_predictor_initializer_present_flag is introduced in the PPS. When this flag is 1, the entry for initializing the palette predictor is signaled in the bitstream. The palette predictor is initialized at the beginning of each CTU row, each slice, and each slice. Depending on the value of palette_predictor_initializer_present_flag, the palette predictor is reset to 0 or initialized using the palette predictor initializer entry signaled in the PPS. In HEVC-SCC, a palette predictor initializer of size 0 is enabled to allow palette predictor initialization to be explicitly disabled at the PPS level.

[0059] For each entry in the palette predictor, a reuse flag is signaled to indicate whether it is part of the current palette. Figure 2 This is illustrated in . A reuse flag is sent using a run length codec of zero. After this, the number of new palette entries is signaled using an order 0 exponential Golomb (EG) code (i.e. EG-0). Finally, the component values ​​for the new palette entries are signaled.

[0060] 2.1.3 Encoding of palette index

[0061] Use as Figure 3 The palette index is encoded and decoded by scanning horizontally and vertically as shown. The scanning order is explicitly signaled in the bitstream using palette_transpose_flag. For the rest of this subsection, it is assumed that the scanning is horizontal.

[0062] The palette index is encoded and decoded using two palette sample modes: "COPY_LEFT" and "COPY_ABOVE". In "COPY_LEFT" mode, the palette index is assigned to the decode index. In "COPY_ABOVE" mode, the palette index of the sample in the row above is copied. For both "COPY_LEFT" and "COPY_ABOVE" modes, a run value is signaled that specifies the number of subsequent samples that are also encoded using the same mode.

[0063] In palette mode, the value of the index for the escaped symbol is the number of palette entries. Also, when the escaped symbols are part of a run in "COPY_LEFT" or "COPY_ABOVE" mode, the escaped component values ​​are signaled for each escaped symbol. Figure 4 The encoding and decoding of the palette index is shown in .

[0064] This syntactic order is accomplished as follows. First, the number of index values ​​for the CU is signaled. After this, the actual index value for the entire CU is signaled using truncated binary coding. Both the number of indexes and the index value are encoded in bypass mode. This groups the index-related bypass bins together. The palette sample mode (if necessary) and run are then signaled in an alternating manner. Finally, the component escape values ​​corresponding to the escape symbols for the entire CU are grouped together and encoded and decoded in bypass mode. The binarization of the escape symbols is a 3rd-order EG coding, i.e., EG-3.

[0065] After signaling the index value, an additional syntax element last_run_type_flag is signaled. This syntax element, combined with the index number, eliminates the need to signal the run value corresponding to the last run in the block.

[0066] In HEVC-SCC, palette mode is also enabled for 4:2:2, 4:2:0 and monochrome chroma formats. The signaling of palette entries and palette indices is almost the same for all chroma formats. For non-monochrome formats, each palette entry consists of 3 components. For monochrome formats, each palette entry consists of a single component. For the subsampled chroma direction, the chroma samples are associated with a luma sample index that is divisible by 2. After the palette index is reconstructed for the CU, if the sample has only a single component associated with it, only the first component of the palette entry is used. The only difference in the signaling is for the escape component values. For each escape symbol, the number of escape component values ​​signaled can be different, depending on the number of components associated with the symbol.

[0067] In addition, there is an index adjustment process in the palette index codec. When signaling the palette index, the left adjacent index or the upper adjacent index should be different from the current index. Therefore, by removing one possibility, the range of the current palette index can be reduced by 1. Then, the index is signaled using a truncated binary code (TB) binarization.

[0068] The text related to this part is shown below, where CurrPaletteIndex is the current palette index and adjustedRefPaletteIndex is the predicted index.

[0069] The variable PaletteIndexMap[xC][yC] specifies the palette index, which is an index into the array represented by CurrentPaletteEntries. The array index xC, yC specifies the position of the sample relative to the top-left luma sample of the picture (xC, yC). The value of PaletteIndexMap[xC][yC] must be in the range of 0 to MaxPaletteIndex (inclusive).

[0070] The variable adjustedRefPaletteIndex is derived as follows:

[0071]

[0072]

[0073] When CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows:

[0074] if(CurrPaletteIndex>=adjustedRefPaletteIndex)

[0075] CurrPaletteIndex++

[0076] In addition, context encoding and decoding is performed on the run length element in the palette mode. The relevant context derivation process described in JVET-O2011-vE is shown below.

[0077] Derivation of ctxInc for the syntax element palette_run_prefix

[0078] The input to this process is the binary index binIdx and the syntax elements copy_above_palette_indices_flag and palette_idx_idc.

[0079] The output of this process is the variable ctxInc.

[0080] The variable ctxInc is derived as follows:

[0081] – If copy_above_palette_indices_flag is equal to 0 and binIdx is equal to 0, ctxInc is derived as follows:

[0082] ctxInc=(palette_idx_idc<1)? 0:((palette_idx_idc<3)?1:2) (9-69)

[0083] – Otherwise, provide ctxInc through Table 1:

[0084] Table 1 – Specification of ctxIdxMap[copy_above_palette_indices_flag][binIdx]

[0085]

[0086] 2.2 Palette Mode in VVC

[0087] 2.2.1 Palette in Dual Tree

[0088] In VVC, a dual number structure is used when coding intra slices, so the luminance component and the two chrominance components can have different palettes and palette indices. In addition, the two chrominance components share the same palette and palette index.

[0089] 2.2.2 Palette as a separate mode

[0090] In JVET-N0258 and the current VTM, the prediction mode for the codec unit can be MODE_INTRA, MODE_INTER, MODE_IBC, and MODE_PLT. The binarization of the prediction mode is changed accordingly.

[0091] When IBC is turned off, on I slices, the first bit is used to indicate whether the current prediction mode is MODE_PLT. On P / B slices, the first bit is used to indicate whether the current prediction mode is MODE_INTRA. If not, an additional bit is used to indicate whether the current prediction mode is MODE_PLT or MODE_INTER.

[0092] When IBC is turned on, on I slices, the first bit is used to indicate whether the current prediction mode is MODE_IBC. If not, the second bit is used to indicate whether the current prediction mode is MODE_PLT or MODE_INTRA. On P / B slices, the first bit is used to indicate whether the current prediction mode is MODE_INTRA. If it is intra mode, the second bit is used to indicate whether the current prediction mode is MODE_PLT or MODE_INTRA. If not, the second bit is used to indicate whether the current prediction mode is MODE_IBC or MODE_INTER.

[0093] The relevant text in JVET-O2001-vE is shown below.

[0094] Codec unit syntax

[0095]

[0096]

[0097] 2.2.3 Palette Mode Syntax

[0098]

[0099]

[0100]

[0101]

[0102]

[0103] 2.2.4 Palette Mode Semantics

[0104] In the semantics below, array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. Array indices xC, yC specify the position (xC, yC) of the sample relative to the top-left luma sample of the picture. Array index startComp specifies the first color component of the current palette table. startComp equal to 0 indicates the Y component; startComp equal to 1 indicates the Cb component; startComp equal to 2 indicates the Cr component. numComps specifies the number of color components in the current palette table.

[0105] The predictor palette consists of palette entries from the previous codec unit that were used to predict the entries in the current palette.

[0106] The variable PredictorPaletteSize[startComp] specifies the size of the predictor palette for the first color component startComp of the current palette table. PredictorPaletteSize is derived as specified in clause 8.4.5.3.

[0107] The variable PalettePredictorEntryReuseFlags[i] equal to 1 specifies that the i-th entry in the predictor palette is reused in the current palette. PalettePredictorEntryReuseFlags[i] equal to 0 specifies that the i-th entry in the predictor palette is not an entry in the current palette. All elements of the array PalettePredictorEntryReuseFlags[i] are initialized to 0.

[0108] Use palette_predictor_run to determine the number of zeros preceding the non-zero entries in the array PalettePredictorEntryReuseFlags.

[0109] A bitstream conformance requirement is that the value of palette_predictor_run must be in the range of 0 to (PredictorPaletteSize - predictorEntryIdx), inclusive, where predictorEntryIdx corresponds to the current position in the array PalettePredictorEntryReuseFlags. The variable NumPredictedPaletteEntries specifies the number of entries from the predictor palette that are reused in the current palette. The value of NumPredictedPaletteEntries must be in the range of 0 to palette_max_size, inclusive.

[0110] num_signalled_palette_entries specifies the number of entries in the current palette that are explicitly signaled for the first color component startComp of the current palette table.

[0111] When num_signalled_palette_entries is not present, it is inferred to be equal to 0.

[0112] The variable CurrentPaletteSize[startComp] specifies the size of the current palette for the first color component startComp of the current palette table and is derived as follows:

[0113] CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries (7-155)

[0114] The value of CurrentPaletteSize[startComp] must be in the range of 0 to palette_max_size (inclusive).

[0115] new_palette_entries[cIdx][i] specifies the value of the i-th signaling palette entry for color component cIdx.

[0116] The variable PredictorPaletteEntries[cIdx][i] specifies the i-th element in the predictor palette for color component cIdx.

[0117] The variable CurrentPaletteEntries[cIdx][i] specifies the i-th element in the current palette for color component cIdx and is derived as follows:

[0118]

[0119] palette_escape_val_present_flag equal to 1 specifies that the current codec unit contains at least one escaped coded sample. escape_val_present_flag equal to 0 specifies that there are no escaped coded samples in the current codec unit. When palette_escape_val_present_flag is not present, its value is inferred to be equal to 1.

[0120] The variable MaxPaletteIndex specifies the maximum possible value of the palette index for the current codec unit. Set the value of MaxPaletteIndex equal to

[0121] CurrentPaletteSize[startComp]-1+palette_escape_val_present_flag.

[0122] num_palette_indices_minus1 plus 1 is the number of palette indices explicitly signaled or inferred for the current block.

[0123] When num_palette_indices_minus1 is not present, it is inferred to be equal to 0.

[0124] palette_idx_idc is an indication of an index into the palette table CurrentPaletteEntries. The value of palette_idx_idc must be in the range of 0 to MaxPaletteIndex (inclusive) for the first index in the block, and in the range of 0 to (MaxPaletteIndex-1) (inclusive) for the remaining indexes in the block.

[0125] When palette_idx_idc is not present, it is inferred to be equal to 0.

[0126] The variable PaletteIndexIdc[i] stores the ith palette_idx_idc, either explicitly signaled or inferred. All elements of the array PaletteIndexIdc[i] are initialized to zero.

[0127] copy_above_indices_for_final_run_flag equal to 1 specifies that: if horizontal traversal scanning is used, the palette index of the last position in the codec unit is copied from the palette index in the upper row; if vertical traversal scanning is used, the palette index of the last position in the codec unit is copied from the palette index in the left column.

[0128] copy_above_indices_for_final_run_flag equal to 0 specifies that the palette index of the last position in this codec unit is copied from PaletteIndexIdc[num_palette_indices_minus1].

[0129] When copy_above_indices_for_final_run_flag is not present, it is inferred to be equal to 0.

[0130] palette_transpose_flag equal to 1 specifies that vertical traversal scanning should be used to scan the indices of the samples in the current codec unit. palette_transpose_flag equal to 0 specifies that horizontal traversal scanning should be used to scan the indices of the samples in the current codec unit. When palette_transpose_flag is not present, its value is inferred to be equal to 0.

[0131] The array TraverseScanOrder specifies the scan order array for palette encoding and decoding. If palette_transpose_flag is equal to 0, then TraverseScanOrder is assigned the horizontal scan order HorTravScanOrder, and if palette_transpose_flag is equal to 1, then TraverseScanOrder is assigned the vertical scan order VerTravScanOrder.

[0132] copy_above_palette_indices_flag equal to 1 specifies that the palette index is equal to the palette index at the same position in the row above if horizontal traversal scanning is used, and the palette index is equal to the palette index at the same position in the left column if vertical traversal scanning is used. copy_above_palette_indices_flag equal to 0 specifies that an indication of the palette index of the sample is encoded or decoded into the bitstream representation or is inferred.

[0133] The variable CopyAboveIndicesFlag[xC][yC] equal to 1 specifies that the palette index is copied from the palette index in the row above (horizontal scan) or column to the left (vertical scan). CopyAboveIndicesFlag[xC][yC] equal to 0 specifies that the palette index is explicitly encoded into the bitstream or inferred. The array indices xC, yC specify the position of the sample relative to the top-left luma sample of the picture (xC, yC). The value of PaletteIndexMap[xC][yC] must be in the range of 0 to (MaxPaletteIndex–1), inclusive.

[0134] The variable PaletteIndexMap[xC][yC] specifies the palette index, which is an index into the array represented by CurrentPaletteEntries. The array index xC, yC specifies the position of the sample relative to the top-left luma sample of the picture (xC, yC). The value of PaletteIndexMap[xC][yC] must be in the range of 0 to MaxPaletteIndex (inclusive).

[0135] The variable adjustedRefPaletteIndex is derived as follows:

[0136]

[0137] When CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows:

[0138] if(CurrPaletteIndex>=adjustedRefPaletteIndex)

[0139] CurrPaletteIndex++ (7-158)

[0140] palette_run_prefix, when present, specifies the prefix part in the binarization of PaletteRunMinus1.

[0141] palette_run_suffix is ​​used in the derivation of the variable PaletteRunMinus1. When palette_run_suffix does not exist, its value is inferred to be equal to 0.

[0142] When RunToEnd is equal to 0, the variable PaletteRunMinus1 is derived as follows:

[0143] – If PaletteMaxRunMinus1 is equal to 0, then set PaletteRunMinus1 equal to 0.

[0144] – Otherwise (PaletteMaxRunMinus1 is greater than 0), then the following applies:

[0145] – If palette_run_prefix is ​​less than 2, then the following applies:

[0146] PaletteRunMinus1=palette_run_prefix (7-159)

[0147] – Otherwise (palette_run_prefix is ​​greater than or equal to 2), then the following applies:

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

[0149] PaletteRunMinus1=PrefixOffset+palette_run_suffix (7-160)

[0150] The variable PaletteRunMinus1 is derived as follows:

[0151] – If CopyAboveIndicesFlag[xC][yC] is equal to 0, then PaletteRunMinus1 specifies the number of consecutive positions with the same palette index minus one.

[0152] – Otherwise, if palette_transpose_flag is equal to 0, then PaletteRunMinus1 specifies the number of consecutive positions with the same palette index as used in the corresponding position in the row above, minus one.

[0153] – Otherwise, PaletteRunMinus1 specifies the number of consecutive positions with the same palette index as used in the corresponding position in the left column minus one.

[0154] When RunToEnd is equal to 0, the variable PaletteMaxRunMinus1 represents the maximum possible value of PaletteRunMinus1, and the requirement for bitstream conformance is that the value of PaletteMaxRunMinus1 must be greater than or equal to 0.

[0155] palette_escape_val specifies the quantized escape coded sample value for a component.

[0156] The variable PaletteEscapeVal[cIdx][xC][yC] specifies the escape value for a sample for which PaletteIndexMap[xC][yC] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1. Array index cIdx specifies the color component. Array indices xC, yC specify the position (xC, yC) of the sample relative to the top left luma sample of the picture.

[0157] The bitstream consistency requirements are: for cIdx equal to 0, PaletteEscapeVal[cIdx][xC][yC] must be in the range of 0 to (1<<(BitDepthY+1))-1 (including the endpoints); for cIdx not equal to 0, PaletteEscapeVal[cIdx][xC][yC] must be in the range of 0 to (1<<(BitDepthC+1))-1 (including the endpoints).

[0158] 1.1.1 Line-based CG palette mode

[0159] VVC has adopted a line-based CG palette mode. In this method, each CU of the palette mode is divided into multiple fragments consisting of m samples (m=16 in this test) based on the traversal scan mode. The encoding order of the palette run encoding in each fragment is as follows: For each pixel, if the pixel has the same mode as the previous pixel, that is, if both the previous scanned pixel and the current pixel have the run type COPY_ABOVE, or if both the previous scanned pixel and the current pixel have the run type INDEX and have the same index value, then signal 1 context codec binary bit run_copy_flag=0. Otherwise, signal run_copy_flag=1. If the pixel and the previous pixel have different modes, then signal a context codec binary bit copy_above_palette_indices_flag to indicate the run type of the pixel, that is, INDEX or COPY_ABOVE. Same as the palette mode in VTM6.0, if the sample is in the first row (horizontal traversal scan) or the first column (vertical traversal scan), the decoder does not have to parse the run type because the INDEX mode is used by default. Moreover, if the previously parsed run type is COPY_ABOVE, the decoder does not have to parse the run type. After the palette run encoding of the pixels in a fragment, in addition to the encoding / parsing of the context codec binary bits, the index values ​​(for INDEX mode) and quantized escape colors are bypassed and decoded and grouped to improve the throughput within each line of CG. Since the index values ​​are now encoded / parsed after the run encoding, instead of being processed before the palette run encoding as in VTM, the encoder does not have to signal the number of index values ​​num_palette_indices_minus1 and the final run type copy_above_indices_for_final_run_flag.

[0160] The text of the line-based CG palette mode in JVET-P0077 is shown below.

[0161] Palette encoding and decoding syntax

[0162]

[0163]

[0164]

[0165]

[0166] 7.4.9.6. Palette encoding and decoding semantics

[0167] In the semantics below, array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. Array indices xC, yC specify the position (xC, yC) of the sample relative to the top-left luma sample of the picture. Array index startComp specifies the first color component of the current palette table. startComp equal to 0 indicates the Y component; startComp equal to 1 indicates the Cb component; startComp equal to 2 indicates the Cr component. numComps specifies the number of color components in the current palette table.

[0168] The predictor palette consists of palette entries from the previous codec unit that were used to predict the entries in the current palette.

[0169] The variable PredictorPaletteSize[startComp] specifies the size of the predictor palette for the first color component startComp of the current palette table. PredictorPaletteSize is derived as specified in clause 8.4.5.3.

[0170] The variable PalettePredictorEntryReuseFlags[i] equal to 1 specifies that the i-th entry in the predictor palette is reused in the current palette. PalettePredictorEntryReuseFlags[i] equal to 0 specifies that the i-th entry in the predictor palette is not an entry in the current palette. All elements of the array PalettePredictorEntryReuseFlags[i] are initialized to 0.

[0171] Use palette_predictor_run to determine the number of zeros preceding the non-zero entries in the array PalettePredictorEntryReuseFlags.

[0172] A bitstream conformance requirement is that the value of palette_predictor_run must be in the range of 0 to (PredictorPaletteSize - predictorEntryIdx), inclusive, where predictorEntryIdx corresponds to the current position in the array PalettePredictorEntryReuseFlags. The variable NumPredictedPaletteEntries specifies the number of entries from the predictor palette that are reused in the current palette. The value of NumPredictedPaletteEntries must be in the range of 0 to palette_max_size, inclusive.

[0173] num_signalled_palette_entries specifies the number of entries in the current palette that are explicitly signaled for the first color component startComp of the current palette table.

[0174] When num_signalled_palette_entries is not present, it is inferred to be equal to 0.

[0175] The variable CurrentPaletteSize[startComp] specifies the size of the current palette for the first color component startComp of the current palette table and is derived as follows:

[0176] CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries (7-155)

[0177] The value of CurrentPaletteSize[startComp] must be in the range of 0 to palette_max_size (inclusive).

[0178] new_palette_entries[cIdx][i] specifies the value of the i-th signaling palette entry for color component cIdx.

[0179] The variable PredictorPaletteEntries[cIdx][i] specifies the i-th element in the predictor palette for color component cIdx.

[0180] The variable CurrentPaletteEntries[cIdx][i] specifies the i-th element in the current palette for color component cIdx and is derived as follows:

[0181]

[0182] palette_escape_val_present_flag equal to 1 specifies that the current codec unit contains at least one escaped coded sample. escape_val_present_flag equal to 0 specifies that there are no escaped coded samples in the current codec unit. When palette_escape_val_present_flag is not present, its value is inferred to be equal to 1.

[0183] The variable MaxPaletteIndex specifies the maximum possible value of the palette index for the current codec unit. Set the value of MaxPaletteIndex equal to CurrentPaletteSize[startComp]-1+palette_escape_val_present_flag.

[0184] palette_idx_idc is an indication of an index into the palette table CurrentPaletteEntries. The value of palette_idx_idc must be in the range of 0 to MaxPaletteIndex (inclusive) for the first index in the block, and in the range of 0 to (MaxPaletteIndex-1) (inclusive) for the remaining indexes in the block.

[0185] When palette_idx_idc is not present, it is inferred to be equal to 0.

[0186] palette_transpose_flag equal to 1 specifies that vertical traversal scanning should be used to scan the indices of the samples in the current codec unit. palette_transpose_flag equal to 0 specifies that horizontal traversal scanning should be used to scan the indices of the samples in the current codec unit. When palette_transpose_flag is not present, its value is inferred to be equal to 0.

[0187] The array TraverseScanOrder specifies the scan order array for palette encoding and decoding. If palette_transpose_flag is equal to 0, then TraverseScanOrder is assigned the horizontal scan order HorTravScanOrder, and if palette_transpose_flag is equal to 1, then TraverseScanOrder is assigned the vertical scan order VerTravScanOrder.

[0188] run_copy_flag equal to 1 specifies that the palette run type is the same run type at the previous scan position, and if copy_above_palette_indices_flag is equal to 0, then the palette run index is the same as the index at the previous position. Otherwise, run_copy_flag is equal to 0.

[0189] copy_above_palette_indices_flag equal to 1 specifies that the palette index is equal to the palette index at the same position in the row above if horizontal traversal scanning is used, and the palette index is equal to the palette index at the same position in the left column if vertical traversal scanning is used. copy_above_palette_indices_flag equal to 0 specifies that an indication of the palette index of the sample is encoded or decoded into the bitstream representation or is inferred.

[0190] The variable CopyAboveIndicesFlag[xC][yC] equal to 1 specifies that the palette index is copied from the palette index in the row above (horizontal scan) or column to the left (vertical scan). CopyAboveIndicesFlag[xC][yC] equal to 0 specifies that the palette index is explicitly encoded into the bitstream or inferred. The array indices xC, yC specify the position of the sample relative to the top left luma sample of the picture (xC, yC).

[0191] The variable PaletteIndexMap[xC][yC] specifies the palette index, which is an index into the array represented by CurrentPaletteEntries. The array index xC, yC specifies the position of the sample relative to the top-left luma sample of the picture (xC, yC). The value of PaletteIndexMap[xC][yC] must be in the range of 0 to MaxPaletteIndex (inclusive).

[0192] The variable adjustedRefPaletteIndex is derived as follows:

[0193]

[0194]

[0195] When CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows:

[0196] if(CurrPaletteIndex>=adjustedRefPaletteIndex)

[0197] CurrPaletteIndex++ (7-158)

[0198] palette_escape_val specifies the quantized escape coded sample value for a component.

[0199] The variable PaletteEscapeVal[cIdx][xC][yC] specifies the escape value for a sample for which PaletteIndexMap[xC][yC] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1. Array index cIdx specifies the color component. Array indices xC, yC specify the position (xC, yC) of the sample relative to the top left luma sample of the picture.

[0200] The bitstream consistency requirements are: for cIdx equal to 0, PaletteEscapeVal[cIdx][xC][yC] must be in the range of 0 to (1<<(BitDepthY+1))-1 (including the endpoints); for cIdx not equal to 0, PaletteEscapeVal[cIdx][xC][yC] must be in the range of 0 to (1<<(BitDepthC+1))-1 (including the endpoints).

[0201] 2.3 Local Dual Trees in VVC

[0202] In typical hardware video encoders and decoders, the processing throughput decreases when a picture has more small intra blocks due to the sample processing data dependency between adjacent intra blocks. The predictor generation for an intra block needs to be derived from the top and left boundary reconstruction samples of the adjacent blocks. Therefore, intra prediction must be processed sequentially block by block.

[0203] In HEVC, the smallest intra CU is 8x8 luma samples. The luma component of the smallest intra CU can be further divided into four 4x4 luma intra prediction units (PUs), but the chroma component of the smallest intra CU cannot be further divided. Therefore, the worst-case hardware processing throughput occurs when processing a 4x4 chroma intra block or a 4x4 luma intra block.

[0204] In VTM5.0, in a single codec tree, since the chroma partitioning always obeys the luma and the minimum intra CU is 4x4 luma samples, the minimum chroma intra CB is 2x2. Therefore, in VTM5.0, the minimum chroma intra CB in a single codec tree is 2x2. The worst-case hardware processing throughput for VVC decoding is 1 / 4 of that for HEVC decoding. In addition, after adopting tools including cross-component linear model (CCLM), 4-tap interpolation filter, position-dependent intra prediction combination (PDPC), and merged inter-frame intra prediction (CIIP), the reconstruction process of chroma intra CB becomes much more complicated than that in HEVC. It is difficult to achieve high processing throughput in a hardware decoder. In this section, a method to improve the worst-case hardware processing throughput is proposed.

[0205] The goal of this method is to not allow chroma intra CBs with less than 16 chroma samples by constraining the segmentation of chroma intra CBs.

[0206] In a single codec tree, a SCIPU is defined as a codec tree node whose chroma block size is greater than or equal to TH chroma samples and has at least one sub-luminance block less than 4TH luminance samples, wherein TH is set to 16 in this document. It is required that in each SCIPU all CBs are inter-frame, or all CBs are non-inter-frame, i.e., intra-frame or IBC. For non-inter-frame SCIPU, it is further required that the chroma of the non-inter-frame SCIPU must not be further divided, and the luminance of the SCIPU is allowed to be further divided. In this way, the minimum chroma intra-frame CB size is 16 chroma samples, and 2x2, 2x4 and 4x2 chroma CBs are removed. In addition, chroma scaling is not applied for non-inter-frame SCIPU. In addition, when the luminance block is further divided and the chroma block is not divided, a local dual-tree codec structure is constructed.

[0207] Figure 5A and Figure 5B Two SCIPU examples are shown. Figure 5A In , a chroma CB with 8x4 chroma samples and three luma CBs (4x8, 8x8, 4x8 luma CB) form a SCIPU, because the ternary tree (TT) partitioned from these 8x4 chroma samples will produce a chroma CB with less than 16 chroma samples. Figure 5B , one chroma CB with 4x4 chroma samples (on the left side of 8x4 chroma samples) and three luma CBs (8x4, 4x4, 4x4 luma CB) form one SCIPU, and another chroma CB with 4x4 samples (on the right side of 8x4 chroma samples) and two luma CBs (8x4, 8x4 luma CB) form one SCIPU, because the binary tree (BT) partitioned by the 4x4 chroma samples will produce a chroma CB with less than 16 chroma samples.

[0208] In the proposed method, if the current slice is an I slice or the current SCIPU has a 4x4 luma split within it after one further partition (because inter 4x4 is not allowed in VVC), the type of SCIPU is inferred as non-inter; otherwise the type of SCIPU (inter or non-inter) is indicated by a signaling flag before parsing the CU in the SCIPU.

[0209] By applying the above method, the worst-case hardware processing throughput occurs when processing 4x4, 2x8 or 8x2 chroma blocks instead of 2x2 chroma blocks. This worst-case hardware processing throughput is the same as in HEVC and 4 times that in VTM5.0.

[0210] 2.4 Transform Skip (TS)

[0211] As in HEVC, the transform skip mode can be used to encode and decode the residual of the block. In order to avoid redundancy in syntax coding, the transform skip flag is not signaled when the CU-level MTS_CU_flag is not equal to zero. The block size restrictions for transform skip are the same as those for MTS in JEM4, which indicates that transform skip is applicable when both the block width and height are equal to or less than 32 for a CU. Note that when LFNST or MIP is not started for the current CU, the implicit MTS transform is set to DCT2. Moreover, when MTS is enabled for inter-frame codec blocks, the implicit MTS can still be enabled.

[0212] Furthermore, for transform skip blocks, the minimum allowed quantization parameter (QP) is defined as 6*(internalBitDepth−inputBitDepth)+4.

[0213] 2.5 Alternative Luminance Half-Pixel Interpolation Filter

[0214] In JVET-N0309, an alternative half-pixel interpolation filter was proposed.

[0215] Switching of half-pixel interpolation filter is done based on motion vector accuracy. In addition to the existing quarter-pixel, full-pixel and 4-pixel AMVR modes, a new half-pixel accuracy AMVR mode is introduced. Only in the case of half-pixel motion vector accuracy, an alternative half-pixel brightness interpolation filter can be selected.

[0216] For non-affine non-merge inter-coded CUs using half-pixel motion vector precision (i.e., half-pixel AMVR mode), switching between the HEVC / VVC half-pixel luma interpolation filter and one or more alternative half-pixel interpolations is done based on a new syntax element hpelIfIdx. The syntax element hpelIfIdx is not signaled for half-pixel AMVR mode. For skip / merge mode using spatial merging candidates, the value of the syntax element hpelIfIdx is inherited from the neighboring block.

[0217] 2.6 Adaptive Color Transform (ACT)

[0218] Figure 6 FIG. 4 shows a decoding flow chart when ACT is applied. Figure 6 As shown in , the color space conversion is performed in the residual domain. Specifically, an additional decoding module called inverse ACT is introduced after the inverse transform to convert the residual from the YCgCo domain back to the original domain.

[0219] In VVC, unless the maximum transform size is less than the width or height of a codec unit (CU), a CU leaf node is also used as the unit of transform processing. Therefore, in the proposed embodiment, the ACT flag is signaled for a CU to select the color space for its residual encoding and decoding. In addition, following the HEVC ACT design, for inter-frame and IBCCU, ACT is enabled only when there is at least one non-zero coefficient in the CU. For intra-frame CU, ACT is enabled only when the chroma component selects the same intra-frame prediction mode as the luma component (i.e., DM mode).

[0220] The core transform for color space conversion is the same as that for HEVC. Specifically, the following forward and inverse YCgCo color transform matrices are applied, as described below.

[0221]

[0222] In addition, to compensate for the dynamic range change of the residual signal before and after the color transform, a QP adjustment of (-5, -5, -3) is applied to the transform residual.

[0223] On the other hand, forward and inverse color transforms are needed to access the residuals of all three components. Correspondingly, in the proposed implementation, ACT is disabled in the following two cases, in which not all residuals of the three components are available.

[0224] 1. Single tree partitioning: When a single tree is applied, the luma samples and chroma samples within a CTU are partitioned according to different structures. This results in the CU in the luma tree containing only luma components and the CU in the chroma tree containing only two chroma components.

[0225] Intra-frame sub-partition prediction (ISP): ISP sub-partitioning is applied only to luma, while chroma signals are encoded without splitting. In the current ISP design, except for the last ISP sub-partitioning, all other sub-partitions contain only luma components.

[0226] 3. Technical problems solved by the technical solutions and embodiments described herein

[0227] 1. The current escape symbol binarization is not fixed length, which can be suitable for sources with uneven distribution.

[0228] 2. The current palette codec design performs an index adjustment process to remove possible redundancy, which may cause parsing redundancy, for example, when the escape value index is incorrectly derived.

[0229] 3. The reference index used to derive the current index may require encoder constraints, which are not considered in the current design and are undesirable for codec design.

[0230] 4. When local dual trees are enabled, the palette index of the previous block and the current block may have different numbers of color components. It is unclear how to handle such a situation.

[0231] 5. Local dual-tree and PLT may not be applied simultaneously because some palette entries may be repeated when encoding and decoding from a single-tree area to a dual-tree area. Figure 7 An example is shown in FIG.

[0232] 6. The chroma QP table for joint_cbcr mode may be restricted.

[0233] 7. Under certain conditions, escape sample points may be redundant.

[0234] 8. Line-based CG patterns may not be processed at high throughput.

[0235] 4. List of Examples and Solutions

[0236] The following enumeration should be considered as an example to explain the general concept. These items should not be interpreted narrowly. In addition, these items can be combined in any way.

[0237] The following examples can be applied to the palette scheme in VVC and all other palette-related schemes.

[0238] In the following bullet points, Qp may represent qP in Section 8.4.5.3 of JVET-P2001-vE.

[0239] In the following bullets, QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode.

[0240] Modulo(x,M) is defined as (x%M) when x is a positive integer; otherwise, it is defined as M-((-x)%M).

[0241] Hereinafter, a block encoded in the lossless mode may mean that the block is encoded with tranquant_bypass_flag equal to 1; or that the block is encoded with QP not greater than a given threshold and transform_skip_flag equal to 1.

[0242] The following examples can be applied to the palette scheme in VVC and all other palette-related schemes.

[0243] 1. Fixed-length encoding and decoding can be applied to the escaped symbols.

[0244] a. In one example, fixed-length binarization signaling may be used to notify escape symbols.

[0245] b. In one example, escape symbols may be signaled in a fixed length binarization using N bits.

[0246] c. In one example, the code length (eg, N mentioned in bullet 1.b) for signaling escape symbols may depend on the internal bit depth.

[0247] i. Alternatively, the code length for signaling escaped symbols may depend on the input bit depth.

[0248] ii. Alternatively, the code length signaling the escape symbols may depend on the difference between the internal bit depth and the input bit depth.

[0249] iii. In one example, N is set equal to the input / internal bit depth.

[0250] d. In one example, the length of a fixed length codec may be signaled within the video processing unit level (eg, slice sub-picture, slice, picture, video).

[0251] e. In one example, the code length (eg, N mentioned in bullet 1.b) for signaling escaped symbols may depend on a quantization parameter, ie, Qp.

[0252] i. In one example, the code length used to signal escaped symbols may be a function of a quantization parameter, denoted, for example, by f(Qp).

[0253] 1. In one example, the function can be defined as (internal bitdepth – g(Qp))

[0254] 2. In one example, N can be set to (internal bitdepth - max(16, (Qp-4) / 6)).

[0255] 3. In one example, N may be set to (internal bitdepth - max(QpPrimeTsMin, (Qp-4) / 6)), where qP is the decoded quantization parameter and QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode.

[0256] 4. Alternatively, the code length N can be set to max(A,internalbitDepth-(Max(QpPrimeTsMin,Qp)-4) / 6), where A is a non-negative integer value such as 0 or 1.

[0257] ii. The Qp mentioned in the above sub-bullets may refer to the slice QP.

[0258] 1. Alternatively, Qp may refer to the slice QP plus a constant value.

[0259] f. In the above examples, N may be greater than or equal to 0.

[0260] 2. The inverse quantization Qp for escaped symbols can be based on slice / picture / PPS level Qp.

[0261] a. In one example, the inverse quantization Qp for escaped symbols may be based on the slice / picture / PPS level Qp plus a given offset.

[0262] i. The offset can be a constant.

[0263] ii. The offset may be indicated explicitly or implicitly in the bitstream.

[0264] b. In one example, block level QP differences can be skipped in the bitstream.

[0265] i. In one example, cbf can be inferred to be 0.

[0266] 3. A left shift may be applied before inverse quantization for escaped signs.

[0267] a. In one example, a left shift of N bits (N>=0) may be applied before inverse quantization.

[0268] i. In one example, N may be equal to Min(bitDepth - 1, (QpPrimeTsMin - 4) / 6), where bitDepth is the internal bit depth.

[0269] ii. Alternatively, N may be equal to bitDepth - inputBD, where inputBD is the input bit depth.

[0270] iii. In one example, input BD may be indicated in the bitstream.

[0271] iv. Alternatively, N may be equal to deltaBD, where deltaBD is indicated in the bitstream.

[0272] 4. The escaped signed inverse quantization may depend on (Qp – QpPrimeTsMin).

[0273] a. In one example, for escaped sign inverse quantization, (Qp - QpPrimeTsMin + 4) may be applied as the inverse quantization Qp.

[0274] b. In one example, for escaped sign inverse quantization, Min(Qp - QpPrimeTsMin + 4,63 + QpBdOffset) may be applied as the inverse quantization Qp.

[0275] 5. The escaped sign inverse quantization can depend on (Qp–N*6).

[0276] a. In one example, N may refer to the number of left shifts in bullet 3.a.

[0277] b. In one example, Max(0,Qp-N*6) may be applied as the inverse quantization Qp.

[0278] 6. Escape sign inverse quantization may depend on deltaBD, ie, the difference between the internal bit depth and the input bit depth.

[0279] a. In one example, for escaped sign inverse quantization, (Qp - deltaBD*6) may be applied as the inverse quantization Qp.

[0280] b. In one example, for escaped sign inverse quantization, Min(Max(0,Qp-deltaBD*6),63+QpBdOffset) may be applied as the inverse quantization Qp.

[0281] 7. It is proposed to prohibit the use of escape symbols in a video unit (eg, CU).

[0282] a. Alternatively, furthermore, signaling of an indication of the presence of escaped symbols is skipped.

[0283] b. In one example, whether to enable / disable the use of escape symbols may depend on the quantization parameter and / or the bit depth.

[0284] i. In one example, if (internal bitDepth - (Max(QpPrimeTsMin, Qp) - 4) / 6) is not greater than 0, then the use of escape symbols may be disabled.

[0285] 8. Variable length coding excluding 3rd order EG can be applied to encode and decode the escaped symbols.

[0286] a. In one example, the binarization of the escaped symbols may be a truncated binary code (TB) with an input parameter K.

[0287] b. In one example, the binarization of the escaped symbols may be of order K EG, where K is not equal to 3.

[0288] i. In one example, the binarization of the escaped symbols may be 0th order EG.

[0289] 1. Alternatively, in one example, the binarization of the escaped symbols may be 1st order EG.

[0290] 2. In one example, the binarization of the escaped symbols may be 2nd order EG.

[0291] c. In one example, K may be an integer value and may depend on:

[0292] i. Messages signaled in SPS / VPS / PPS / picture header / slice header / slice group header / LCU row / LCU group / brick.

[0293] ii. Internal bit depth

[0294] iii. Input bit depth

[0295] iv. Difference between internal bit depth and input depth

[0296] v. The block dimension of the current block

[0297] vi. Current quantization parameter of the current block

[0298] vii. Indication of color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0299] viii. Codec structure (such as single tree or dual tree)

[0300] ix. Color components (such as luminance components and / or chrominance components)

[0301] 9. Multiple binarization methods for encoding and decoding escaped symbols can be applied to video units (e.g., sequences / pictures / strips / slices / bricks / sub-pictures / CTU rows / CTUs / CTBs / CBs / CUs / sub-regions within pictures) and / or to one or more escaped symbol values.

[0302] a. In one example, the selection of one of a plurality of binarization methods may be signaled for a video unit and / or for one or more escape symbol values.

[0303] b. In one example, how to select one of a plurality of binarization methods may be derived for a video unit and / or for one or more escaped symbol values.

[0304] c. In one example, for one video unit and / or for one or more escaped symbol values, two or more binarization methods may be applied.

[0305] i. In one example, an index or flag may be encoded / decoded to identify the selected binarization method.

[0306] In the following bullet points, p may represent the sign value of a color component, and bd may represent the bit depth (e.g., internal bit depth or input bit depth), ibd may represent the input bit depth, and Qp may represent the bit depth for transform skip The quantization parameter for a block or transform block. In addition, the QP for luma and chroma components can be different or the same. Bit depth A degree may be associated with a given color component.

[0307] 10. How the quantization and / or inverse quantization process is applied may depend on whether the block is encoded in palette mode.

[0308] a. In one example, the quantization and / or inverse quantization processes for escaped symbols may be different from those used for normal intra / inter codec blocks to which quantization is applied.

[0309] 11. The quantization and / or inverse quantization process for escaping symbols may use bit shifting.

[0310] a. In one example, right bit shifting can be used to quantize escaped symbols.

[0311] i. In one example, the escaped symbols may be signaled as f(p, Qp), where p is the input symbol value (eg, input luma / chroma sample value) and Qp is the derived quantization parameter for the corresponding color component.

[0312] 1. In one example, the function f can be defined as p>>g(Qp).

[0313] 2. In one example, the function f may be defined as (p+(1<<(g(QP)-1)))>>g(Qp).

[0314] 3. In one example, the function f can be defined as (0, (1 < <bd)-1,(p+(1<<(g(QP)-1)))> >g(Qp)).

[0315] ii. In one example, the escaped symbols may be signaled as h(p).

[0316] 1. In one example, the function h can be defined as p>>N.

[0317] 2. In one example, the function h can be defined as (p+(1<<(N-1)))>>N.

[0318] 3. In one example, when cu_transquant_bypass_flag is equal to 1, N may be set to 0.

[0319] 4. In one example, when cu_transquant_bypass_flag is equal to 1, N may be set equal to (bd - ibd), where bd is the internal bit depth and ibd is the input bit depth.

[0320] 5. In one example, the function h can be defined as clip(0,(1<<(bd-N)-1,p>>N), where bd is the internal bit depth of the current color component.

[0321] 6. In one example, the function h can be defined as clip(0,(1<<(bd-N)-1,(p+(1<<(N-1)))>>N), where bd is the internal bit depth of the current color component.

[0322] 7. In the above examples, N can be in the range of [0, (bd–1)].

[0323] b. In one example, left bit shifting can be used to inverse quantize the escaped symbols.

[0324] i. In one example, the escaped symbols may be inversely quantized to f(p, Qp), where p is the decoded escaped symbol and Qp is the derived quantization parameter for the corresponding color component.

[0325] 1. In one example, f can be defined as p< <g(Qp)

[0326] 2. In one example, f can be defined as (p < <g(Qp))+(1<<(g(Qp)-1))。

[0327] ii. In one example, the escaped symbols may be reconstructed as f(p, Qp), where p is the decoded escaped symbol.

[0328] 1. In one example, f can be defined as clip(0,(1< <bd)-1,p<<g(Qp))

[0329] 2. In one example, f can be defined as clip(0,(1< <bd)-1,(p<<g(Qp))+(1<<(g(Qp)-1)))。

[0330] iii. In one example, the escaped symbols can be reconstructed as h(p).

[0331] 1. In one example, the function h can be defined as p< <N。

[0332] 2. In one example, the function h can be defined as (p < <N)+(1<<(N-1))

[0333] 3. In one example, when cu_transquant_bypass_flag is equal to 1, N may be set to 0.

[0334] 4. In one example, when cu_transquant_bypass_flag is equal to 1, N may be set equal to (bd - ibd), where bd is the internal bit depth and ibd is the input bit depth.

[0335] 5. In one example, N may be set to (max(QpPrimeTsMin,qP)-4) / 6, where qP is the decoded quantization parameter and QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode.

[0336] a) In the above example, if both luma and chroma have transform skip modes, different minimum allowed quantization parameters for transform skip modes may be applied to different color components.

[0337] 6. Alternatively, for the above example, N can be further clipped, for example, min(bd-1,N).

[0338] 7. In the above examples, N can be in the range of [0, (bd–1)].

[0339] 12. When applying a left shift as inverse quantization, the reconstructed offset of the escape symbol p may depend on the bit depth information.

[0340] a. In one example, it may depend on the difference between the internal bitdepth and the input bitdepth, ie, deltaBD = internal bidepth - input bitdepth.

[0341] b. When K is less than or equal to deltaBD, the reconstruction value can be p< <K。

[0342] c. When K is greater than deltaBD, the reconstructed value can be (p< <K)+(1<<(K-1))。

[0343] d. When K is less than or equal to T0 (for example, T0=2), the reconstruction value can be p< <K。

[0344] e. When K is greater than T1 (for example, T1 = 2), the reconstruction value can be (p < <K)+(1<<(K-1))

[0345] f. In one example, T0 and T1 in bullet points d and e may be signaled in the bitstream (eg, at sequence / picture / slice / tile / sub-picture level).

[0346] g. In one example, the reconstruction value may be (p < <K)+((1<<(K-1))> >deltaBD< <deltaBD)。

[0347] h. In one example, the reconstruction value may be ((p<<(K+1))+(1<<K))> >(deltaBD+1)< <deltaBD。

[0348] i. In one example, deltaBD may be signaled in the bitstream (eg, at sequence / picture / slice / tile / sub-picture level).

[0349] j. In one example, which reconstructed value (eg, bullets b through e) should be used may depend on the quantization parameter of the current block.

[0350] k. In one example, which reconstruction value (eg, bullets b through e) should be used may depend on the value of deltaBD.

[0351] 1. In one example, K can be set to g(Qp).

[0352] 13. In the above example, the following may apply:

[0353] a. In one example, the escaped symbols may be context encoded and decoded.

[0354] b. In one example, the escaped symbols may be bypass encoded and decoded.

[0355] c. In one example, g(Qp) may be defined as (Qp-4) / 6 or QP / 8.

[0356] i. Alternatively, g(Qp) may be defined as Qp / 6 or QP / 8.

[0357] ii. Alternatively, g(Qp) can be defined as max(16,Qp / 6)).

[0358] iii. Alternatively, g(Qp) can be defined as max(16, (Qp-4) / 6).

[0359] iv. Alternatively, g(Qp) can be defined as max((bd-ibd)*6+4,(Qp-4) / 6).

[0360] v. Alternatively, g(Qp) can be defined as max(M,(Qp-4) / 6).

[0361] 1. In one example, M can be signaled to the decoder.

[0362] vi. Alternatively, g(Qp) can be defined as max((M,Qp)-4) / 6.

[0363] 1. In one example, M may be indicated in the SPS.

[0364] 2. In one example, the same or different M can be applied to luma and chroma components.

[0365] 3. In one example, M may be equal to (bd-ibd)*6+4.

[0366] vii. Alternatively, g(Qp) may be defined as Qp / 6 or QP / 8.

[0367] viii. Alternatively, g(Qp) may be defined as (max(16,Qp) / 6).

[0368] ix. Alternatively, g(Qp) can be defined as (max(16,Qp)-4) / 6.

[0369] d. In the above example, the value of g(Qp) can be in the range of [0,(bd–1)].

[0370] e. In one example, the max function max(a,i) may be defined as (i<=a?a:i).

[0371] i. Alternatively, in one example, the max function max(a,i) can be defined as (i <a?a:i)。

[0372] f. In one example, N may be an integer (e.g., 8 or 10) and may depend on:

[0373] i. Messages signaled in SPS / VPS / PPS / picture header / slice header / slice group header / LCU row / LCU group / brick.

[0374] ii. Internal bit depth

[0375] iii. Input bit depth

[0376] iv. Difference between internal bit depth and input depth

[0377] v. The block dimension of the current block

[0378] vi. Current quantization parameter of the current block

[0379] vii. Indication of color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0380] viii. Codec structure (such as single tree or dual tree)

[0381] ix. Color components (such as luminance components and / or chrominance components)

[0382] x. Strip / slice group type and / or picture type

[0383] g. In one example, N may be signaled to the decoder.

[0384] 14. Qp for outlier values ​​may be clipped.

[0385] a. In one example, the minimum Qp applied to the escape value may be equal to min_qp_prime_ts_minus4.

[0386] b. In one example, the minimum Qp applied to escape values ​​may be related to min_qp_prime_ts_minus4.

[0387] i. In one example, the lowest Qp applied to escape values ​​may be equal to min_qp_prime_ts_minus4+4.

[0388] c. In one example, the lowest Qp for each color component may be indicated in the SPS / PPS / VPD / DPS / slice / strip header.

[0389] d. In one example, the lowest Qp applied to the escape value may be (bd-ibd)*6+4, where bd is the internal bit depth and ibd represents the input bit depth for a certain color component.

[0390] e. In one example, the above example can be applied to a certain color component.

[0391] 15. In the above example, the chroma Qp for the escape value can use the Qp before / after mapping.

[0392] 16. It is proposed not to use the reference index when deriving the current palette index in palette mode.

[0393] a. In one example, the palette index may be signaled directly without excluding the possibility of a reference index (eg, adjustedRefPaletteIndex).

[0394] i. Alternatively, in one example, the encoder can be restricted to enabling reference indices that are always different from the current index. In such a case, the palette index can be signaled by excluding the possibility of the reference index.

[0395] b. In one example, the binarization of the palette index may be a truncated binary code (TB), where the maximum palette index is used as a binarization input parameter.

[0396] c. In one example, the binarization of the palette index may be fixed length.

[0397] d. In one example, the binarization of the palette index may be of order K EG.

[0398] i. In one example, K may be an integer value (e.g., 1, 2, or 3) and may depend on:

[0399] 1. Messages signaled in SPS / VPS / PPS / picture header / slice header / slice group header / LCU line / LCU group / brick.

[0400] 2. Internal bit depth

[0401] 3. Input bit depth

[0402] 4. Difference between internal bit depth and input depth

[0403] 5. Block dimensions of the current block

[0404] 6. Current quantization parameter of the current block

[0405] 7. Indication of color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0406] 8. Codec structure (such as single tree or dual tree)

[0407] 9. Color components (such as brightness components and / or chrominance components)

[0408] e. In one example, the above example can be applied only when the current block has at least one escaped sample.

[0409] 17. The current palette index can be signaled independently of the previous palette index.

[0410] a. In one example, whether and / or how to use the previous palette index may depend on whether there are escaped samples in the current block.

[0411] 18. It is not allowed to deduce the index of a non-escaped symbol from the index of an escaped symbol.

[0412] a. In one example, when escape symbols are applied and the palette index is not equal to the index of the escape symbol, decoding of the symbol into the escape symbol may not be allowed.

[0413] 19. It is not allowed to deduce the index of an escaped symbol from the index of a non-escaped symbol.

[0414] a. In one example, when an escape symbol is applied and the palette index is equal to the index of the escape symbol, decoding of the symbol into a non-escape symbol may not be allowed.

[0415] 20. An upper limit can be added to the derived palette index from the current palette table size.

[0416] a. In one example, when the palette index is greater than MaxPaletteIndex, it can be modified to be equal to MaxPaletteIndex.

[0417] 21. The derived palette index may be capped by the current palette table size excluding the indices of escaped symbols.

[0418] a. In one example, when escape symbols are not applied and the palette index is greater than MaxPaletteIndex, it can be modified to be equal to MaxPaletteIndex.

[0419] b. In one example, when escape symbols are applied and the palette index is greater than (MaxPaletteIndex–1), it can be modified to be equal to (MaxPaletteIndex–1).

[0420] 22. Modification of the index indicating the escape symbol may not be allowed.

[0421] a. In one example, when there are escape symbols in the current block, an index equal to MaxPaletteIndex may always indicate the escape symbols.

[0422] b. In one example, an index not equal to MaxPaletteIndex cannot be decoded as an index indicating an escape symbol.

[0423] 23. It is proposed to encode and decode the difference between the reference index and the current index.

[0424] a. In one example, encoding and decoding of a difference equal to 0 may not be allowed.

[0425] b. Alternatively, for the first index in the palette encoding and decoding block, the index can be directly encoded and decoded.

[0426] 24. It is proposed to encode and decode the modulo of the difference between the reference index (denoted as R) and the current index (denoted as C).

[0427] a. In one example, I=Modulo(CR,MaxPaletteIndex) may be encoded.

[0428] i. In one example, the index can be rebuilt as Modulo(I+R,MaxPaletteIndex)

[0429] ii. In one example, Modulo(CR,MaxPaletteIndex) equal to 0 may not be allowed in the bitstream.

[0430] iii. In one example, the value may be encoded using a truncated binary code with cMax=MaxPaletteIndex.

[0431] iv. Alternatively, for the first index in the palette encoding and decoding block, the index can be directly encoded and decoded.

[0432] b. In one example, I=Modulo(CR,MaxPaletteIndex)−1 may be encoded and decoded.

[0433] i. In one example, the index can be rebuilt as Modulo(I+1+R,MaxPaletteIndex)

[0434] ii. In one example, Modulo(CR,MaxPaletteIndex)−1 less than 0 may not be allowed in the bitstream.

[0435] iii. In one example, the value I may be encoded and decoded using a truncated binary code with cMax=(MaxPaletteIndex−1).

[0436] iv. Alternatively, for the first index in the palette encoding block, Modulo(CR,MaxPaletteIndex) can be encoded.

[0437] v. Alternatively, for the first index in the palette codec block, the index can be directly decoded.

[0438] 25. When starting to decode a palette block, the reference index R can be set equal to -1.

[0439] a. Alternatively, the reference index R may be set equal to 0.

[0440] 26. It is proposed to enable palette mode and local dual tree mutually exclusively.

[0441] a. In one example, when palette mode is enabled, local double trees may not be allowed.

[0442] i. Alternatively, in one example, palette mode may not be allowed when local dual trees are enabled.

[0443] b. In one example, local dual trees are not enabled for certain color formats (eg, 4:4:4).

[0444] c. In one example, when the codec tree is MODE_TYPE_INTRA, palette mode may not be allowed.

[0445] d. A palette reset predictor based on a local double tree is proposed.

[0446] i. In one example, the palette predictor may be reset when switching a single tree to a local dual tree.

[0447] ii. In one example, the palette predictor may be reset when switching the local dual tree to a single tree.

[0448] iii. Alternatively, furthermore, whether to signal the use of entries in the palette predictor (eg palette_predictor_run) may depend on the tree type.

[0449] 1. In one example, signaling of the use of entries in the palette predictor (eg, palette_predictor_run) is omitted when a switch between a local dual tree and a single tree is encountered.

[0450] 27. It is proposed to remove duplicate palette entries in the palette prediction table when applying local dual trees.

[0451] a. In one example, the palette prediction table may be reset when applying a local dual tree.

[0452] i. Alternatively, in one example, when applying a local dual tree, the decoder may check all palette entries in the prediction table and remove duplicate palette entries.

[0453] ii. Alternatively, in one example, when applying a local dual tree, the decoder may check partial palette entries in the prediction table and remove duplicate palette entries.

[0454] iii. In one example, full pruning or partial pruning may be applied when checking palette entries.

[0455] 1. In one example, a selected set of entries may be checked (eg, the set includes all or part of the palette entries in a palette predictor).

[0456] a) In one example, full or partial pruning may be applied to selected entries.

[0457] 2. In one example, full pruning can mean comparing one entry to all entries that can be added.

[0458] 3. In one example, partial pruning may mean comparing an entry with a partial entry that may be added.

[0459] iv. In one example, whether two palette entries are identical may be based on whether their luminance component values ​​are identical.

[0460] 1. Alternatively, in one example, whether two palette entries are identical may be based on whether their chroma component values ​​are identical.

[0461] 2. Alternatively, in one example, whether two palette entries are identical may be based on whether both their luma and chroma component values ​​are identical.

[0462] v. In one example, the above method may be applied to the luma block only when the local dual tree starts processing the luma component.

[0463] 1. Alternatively, in one example, the above method may be applied to the chroma block only when the local dual tree starts processing the chroma component.

[0464] vi. Alternatively, in one example, the encoder may add a constraint to consider two different palette entries that are different when their three components are different.

[0465] 28. When the current palette entry and the entry in the palette prediction table have a different number of color components, the use of the palette prediction table may be disallowed.

[0466] a. In one example, when the current palette entry has a different number of color components than the prediction, the reuse flag of all entries in the palette prediction table may be marked as true, but they may not be used for the current block.

[0467] b. In one example, when the current palette entry and the prediction have different numbers of color components, the reuse flags of all entries in the palette prediction table may be marked as false.

[0468] 29. When the predicted table has different color components from the current palette table, the use of the palette prediction table may be disallowed.

[0469] a. In one example, when the prediction table has different color components from the current palette table, the reuse flags of all entries in the palette prediction table may be marked as true, but they may not be used for the current block.

[0470] b. In one example, when the prediction table and the current palette table have different color components, the reuse flags of all entries in the palette prediction table may be marked as false.

[0471] 30. The escaped symbols may be predictively encoded and decoded, for example, based on previously encoded and decoded escaped symbols.

[0472] a. In one example, the escape symbol in one component can be predicted by the codec value in the same color component.

[0473] i. In one example, the escaped symbol may use the escaped symbol of the previous codec in the same component as a predictor and the residual between them may be signaled.

[0474] ii. Alternatively, the escaped symbol may adopt the Kth previous coded escaped symbol in the same component as a predictor, and the residual between them may be signaled.

[0475] iii. Alternatively, the escaped symbol can be predicted by multiple (eg, K) coded escaped symbols in the same component.

[0476] 1. In one example, K may be an integer value (e.g., 1, 2, or 3) and may depend on:

[0477] a) Messages signaled in SPS / VPS / PPS / picture header / slice header / slice group header / LCU row / LCU group / brick.

[0478] b) Internal bit depth

[0479] c) Input bit depth

[0480] d) Difference between internal bit depth and input depth

[0481] e) The block dimension of the current block

[0482] f) The current quantization parameter of the current block

[0483] g) Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0484] h) Codec structure (such as single tree or dual tree)

[0485] i) Color components (such as luminance components and / or chrominance components)

[0486] b. In one example, escaped symbols in one component can be predicted by the codec value in another component.

[0487] c. In one example, a pixel may have multiple color components, and if the pixel is treated as an escape symbol, the value of one component can be predicted by the values ​​of samples of other components.

[0488] i. In one example, the U component of an escaped symbol can be predicted by the V component of that symbol.

[0489] d. In one example, the above method may be applied only to a certain color component (eg, to a luminance component or a chrominance component) or under certain conditions (eg, based on encoding information).

[0490] 31. The signaling of syntax elements related to the palette may depend on the maximum size of the palette and / or

[0491] or block dimensions and / or use of lossless mode and / or quantization parameter (QP).

[0492] a. In one example, for lossless code blocks and / or QP is not greater than a threshold and / or transform skip is applied, the palette size of the block is inferred to be equal to the block dimension.

[0493] i. Alternatively, for lossless code blocks and / or QP is not greater than a threshold, the palette size of the block is inferred to be equal to min(block dimension, maximum palette size).

[0494] b. Whether to signal the use of escape samples in a block may depend on the block dimension and / or the use of lossless codec mode (e.g., whether QP is equal to a given value (e.g., 4); and / or transform_skip_flag is equal to 1; or whether transquant_bypass_flag is equal to true) and / or Qp.

[0495] i. Alternatively, furthermore, whether to signal the use of escape samples may depend on the relationship between the block dimensions of the current block and the current palette size.

[0496] 1. In one example, whether to signal it may depend on whether the block dimension is equal to the current palette size.

[0497] a) Alternatively, furthermore, if the block dimension is equal to the current palette size, then it is not signaled and is inferred to be false.

[0498] 2. Alternatively, whether to signal it may depend on whether the block dimension is smaller than the current palette size.

[0499] a) Alternatively, furthermore, if the block dimension is not smaller than the current palette size, then it is not signaled and is inferred to be false.

[0500] ii. Alternatively, whether to signal the use of escape samples may also depend on the relationship between block dimensions, maximum size of the palette and / or lossless mode.

[0501] 1. In one example, if a block is coded in lossless mode and the block dimension is smaller than the maximum size of the palette, then the signaling of the use of escape samples can be omitted and inferred to be false.

[0502] 2. In one example, if a block is coded with a QP no greater than a threshold, and the block dimension is less than the maximum size of the palette, then the signaling of the use of escape samples may be omitted and inferred to be false.

[0503] iii. An indication of the use of escape samples (eg palette_escape_val_present_flag) may be inferred under certain conditions.

[0504] 1. In one example, when the current block size is less than or equal to the maximum allowed palette size (eg, palette_max_size), the indication of the use of escape samples may be inferred to be false.

[0505] a) Alternatively, in one example, when the current block size is larger than the maximum allowed palette size, an indication of the use of escape samples may be signaled.

[0506] b) Alternatively, in one example, when the current block size is larger than the maximum allowed palette size, the indication of the use of escape samples may be inferred to be false.

[0507] 2. In one example, the above method can be applied under lossless coding conditions.

[0508] 3. In one example, the above method may be applied to a CU that is subjected to lossless coding.

[0509] 4. In one example, when the current block size is less than or equal to the palette size of the current block, the indication of the use of escape samples may be inferred to be false.

[0510] 5. In one example, when the usage flag of the escape sample is inferred, the corresponding syntax element may be skipped in the bitstream, for example, palette_escape_val_present_flag.

[0511] 32. The context for run-length encoding and decoding in palette mode may depend on the palette index used to index the palette entries.

[0512] a. In one example, the palette index after the index adjustment process (mentioned in Section 2.1.3) at the decoder can be used to derive the context for the prefix of the length element (e.g., palette_run_prefix).

[0513] b. Alternatively, I defined in bullet point 13 may be used in place of a palette index to derive the context for the prefix of the length element (eg, palette_run_prefix).

[0514] 33. It is proposed to align the positions of the left neighboring blocks and / or the upper neighboring blocks used in the derivation process of the quantization parameter predictor with the positions of the adjacent left blocks and / or the upper neighboring blocks used in the mode / MV (e.g., MPM) derivation.

[0515] a. Align the positions of the left neighboring block and / or the top neighboring block used in the derivation process for the quantization parameter predictor with those used in the merge / AMVP candidate list derivation process.

[0516] b. In one example, the positions of the left neighboring block and / or the upper neighboring block used in the derivation process of the quantization parameter predictor may be Figure 8 The adjacent block to the left / above shown in .

[0517] 34. The block-level QP difference can be sent independently of whether there are escaped samples in the current block.

[0518] a. In one example, whether and / or how the block-level QP difference is sent may be subject to blocks encoded in modes other than palette.

[0519] b. In one example, block level QP differences may never be sent for palette blocks.

[0520] c. In one example, when the block width is greater than a threshold, a block-level QP difference may be sent for the palette block.

[0521] d. In one example, when the block height is greater than a threshold, a block-level QP difference may be sent for the palette block.

[0522] e. In one example, when the block size is greater than a threshold, a block-level QP difference may be sent for the palette block.

[0523] f. In one example, the above example may only apply to luma blocks or chroma blocks.

[0524] 35. One or more of the codec block flags (CBFs) of the palette segment (e.g., cbf_luma, cbf_cb, cbf_cr) may be set equal to 1.

[0525] a. In one example, the CBF for the palette block may always be set equal to 1.

[0526] b. One or more of the CBFs used for the palette block may depend on whether there are escaped pixels in the current block.

[0527] i. In one example, when a palette block has an escaped sample, its cbf may be set equal to 1.

[0528] ii. Alternatively, when a palette block has no escape samples, its cbf may be set equal to 0.

[0529] c. Alternatively, when accessing a neighboring palette coded block, it can be treated as an intra-coded block with CBF equal to 1.

[0530] 36. For a palette, the luma and / or chroma QP applied to the palette can be compared to the QP derived for the block (e.g., QP in the JVET-O2001-vE specification). Y or Qp′ Y ) is set equal to a fixed value.

[0531] a. In one example, the luma and / or chroma QP offsets may be set equal to 0.

[0532] b. In one example, the chroma QP offset may be different for Cb and Cr.

[0533] c. In one example, the luma QP offset and the chroma QP offset may be different.

[0534] d. In one example, the chroma QP offset may be indicated in the DPS / VPS / SPS / PPS / slice / brick / slice header.

[0535] 37. You can make Num PltIdx The number of palette indices (eg, num_palette_indices_minus1+1) represented as explicitly signaled or inferred for the current block is constrained to be greater than or equal to K.

[0536] a. In one example, K can be determined based on the current palette size, escape flag, and / or other information of the palette codec block. Let S be the current palette size of the current block, and let E be the value of the escape present flag (e.g., palette_escape_val_present_flag). Let BlkS be the current block size.

[0537] i. In one example, K can be set equal to S.

[0538] ii. Alternatively, in one example, K may be set equal to S+E.

[0539] iii. Alternatively, in one example, K may be set equal to (number of predicted palette entries + number of signaled palette entries + palette_escape_val_present_flag) (eg, NumPredictedPaletteEntries + num_signalled_palette_entries + palette_escape_val_present_flag).

[0540] iv. Alternatively, in one example, K may be set equal to (the maximum value of the palette index (egMaxPaletteIndex) plus 1).

[0541] v. Alternatively, in one example, K may be signaled to the decoder.

[0542] i. In one example, K may be a fixed integer value.

[0543] ii. In one example, K is an integer value and may be determined based on the following options:

[0544] 1. Decoding information of the previous coded block / current block

[0545] 2. Quantization parameters of the current block / adjacent (adjacent or non-adjacent) blocks

[0546] 3. Video content (e.g., screen content or organic content)

[0547] 4. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture header / Slice header / Slice group header / Largest codec unit (LCU) / Codec unit (CU) / LCU row / LCU group / TU / PU block / Video codec unit

[0548] 5. Location of CU / PU / TU / block / video codec unit

[0549] 6. Block size of the current block and / or its neighboring blocks

[0550] 7. Block shape of the current block and / or its neighboring blocks

[0551] 8. Indication of color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0552] 9. Codec tree structure (such as dual tree or single tree)

[0553] 10. Strip / slice group type and / or picture type

[0554] 11. Color components (e.g., may apply only to luma or chroma components)

[0555] 12. Time domain layer ID

[0556] 13. Profiles / Levels / Hierarchies

[0557] b. In one example, signaling notification / analysis (Num PltIdx minus K) instead of num_palette_indices_minus1.

[0558] i. Alternatively, furthermore, it may be signaled only when (S+E) is not less than 1.

[0559] ii. In one example, a binary method can be used to signal (Num PltIdx minus K), wherein the binarized binary string may have a prefix (e.g., a truncated unary code) and / or a suffix using an m-order EG code.

[0560] iii. In one example, a truncated binary code binarization method can be used to signal (Num PltIdx minus K) value.

[0561] iv. In one example, a truncated unary code binarization method can be used to signal (Num PltIdx minus K) value.

[0562] v. In one example, the m-order EG binarization method can be used to signal (Num PltIdx minus K) value.

[0563] vi. In one example, the value of BlkS-K can be used as an input parameter (eg, cMax) in the above binarization method, for example, used as the maximum value for the truncated unary code / truncated binary code binarization method.

[0564] c. In one example, the conforming bitstream must satisfy Num PltIdx Greater than or equal to K.

[0565] d. In one example, the conforming bitstream must satisfy Num PltIdx Less than or equal to K.

[0566] i. In one example, K' is set to (block width * block height).

[0567] ii. In one example, K' is set to (block width * block height - K).

[0568] 38. Whether and / or how the above methods are applied may be based on:

[0569] a. Video content (e.g., screen content or natural content)

[0570] b. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture Header / Slice Header / Slice Group Header / Largest Codec Unit (LCU) / Codec Unit (CU) / LCU Line / LCU Group / TU / PU Block / Video Codec Unit

[0571] c. Location of CU / PU / TU / block / video codec unit

[0572] d. Block size of the current block and / or its neighboring blocks

[0573] e. Block shape of the current block and / or its neighboring blocks

[0574] f. Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0575] g. Codec tree structure (such as dual tree or single tree)

[0576] h. Strip / slice group type and / or picture type

[0577] i. Color components (e.g., may apply only to luma components or chroma components)

[0578] j. Time domain layer ID

[0579] k. Profile / Level / Hierarchy

[0580] l. Whether the current block has an escape sample point.

[0581] i. In one example, the above method may be applied only when the current block has at least one escaped sample.

[0582] m. Whether the current block is encoded or decoded in lossless mode (for example, cu_transquant_bypass_flag)

[0583] i. In one example, the above method may be applied only when the current block is not encoded in lossless mode.

[0584] n. Whether to enable lossless codec (for example, transquant_bypass_enabled, cu_transquant_bypass_flag)

[0585] i. In one example, the above method may be applied only when lossless codec is disabled.

[0586] Related line-based CG palette modes

[0587] 39. It can be indicated for each CG whether these are outlier samples.

[0588] a. In one example, for each CG, a syntax element (eg, palette_escape_val_present_flag) may be sent in the bitstream to indicate whether an escape sample exists.

[0589] i. In one example, palette_escape_val_present_flag may be signaled or inferred based on the CG size, the number of decoded samples in the current block, and / or the palette size of the current block.

[0590] b. In one example, for the current CG, when the escape sample point does not exist, index adjustment can be applied.

[0591] c. In one example, for the current CG, when there are outlier samples, index adjustment should not be applied.

[0592] d. In one example, the above method may be applied only when the current block contains escaped samples.

[0593] 40. In line-based CG palette mode, the indication of the use of copy above indices (eg, copy_above_palette_indices_flag) may not be context-coded.

[0594] e. Alternatively, in one example, the indication of the use of copy above indexes (eg, copy_above_palette_indices_flag) may be bypass-encoded without using any context.

[0595] i. In one example, the indication of the use of copy above indexes (eg, copy_above_palette_indices_flag) and the copy flag in the current fragment (eg, run_copy_flag) may be signaled interleaved.

[0596] f. In one example, the indication of the use of copy above indexes (eg, copy_above_palette_indices_flag) may be encoded after signaling all copy flags (eg, run_copy_flag) in the current segment.

[0597] g. In one example, the indication of the use of copy above indexes (eg, copy_above_palette_indices_flag) and the signaled indexes may be encoded and decoded interleaved.

[0598] h. The above method can also be applied to other palette-based encoding and decoding modes.

[0599] 41. The copy flag, run type, indication of use of copy above index, and escape values ​​may be signaled in an interleaved manner.

[0600] i. In one example, a first copy flag, a run type, an indication of the use of a copy above index, and an escape value may be encoded and decoded in order; followed by a second copy flag, a run type, an indication of the use of a copy above index, and an escape value.

[0601] j. Alternatively, furthermore, for a given CG, the above method may be applied.

[0602] 42. The line-based CG palette mode may be disabled for blocks having a size less than or equal to a given threshold (denoted as Th).

[0603] k. In one example, Th is equal to the number of samples of the fragment in line-based CG palette mode.

[0604] l. In one example, Th is a fixed value (e.g., 16) and can be based on

[0605] i. Video content (e.g., screen content or natural content)

[0606] ii. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture header / Slice header / Slice group header / Largest codec unit (LCU) / Codec unit (CU) / LCU row / LCU group / TU / PU block / Video codec unit

[0607] iii. Location of CU / PU / TU / block / video codec unit

[0608] iv. Block size of the current block and / or its neighboring blocks

[0609] v. Block shape of the current block and / or its neighboring blocks

[0610] vi. Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0611] vii. Codec tree structure (such as dual tree or single tree)

[0612] viii. Slice / slice group type and / or picture type

[0613] ix. Color components (e.g., may apply only to luma or chroma components)

[0614] x. Time domain layer ID

[0615] xi. Profiles / Levels / Hierarchies

[0616] xii. Quantization parameter of the current block

[0617] xiii. Whether the current block has an escape sample point.

[0618] xiv. Whether to enable lossless codec (e.g., transquant_bypass_enabled, cu_transquant_bypass_flag)

[0619] Related BDPCM

[0620] 43. When a block is encoded using BDPCM and divided into multiple transform blocks or sub-blocks, residual prediction can be done at the block level and residual signaling can be done at the sub-block / transform block level.

[0621] a. Alternatively, in addition, reconstruction of one sub-block is not allowed during reconstruction of another sub-block.

[0622] b. Alternatively, residual prediction and signaling of the residual is done at sub-block / transform block level.

[0623] i. In this way, the reconstruction of one sub-block can be utilized during the reconstruction of another sub-block.

[0624] Related Chroma QP Table

[0625] 44. For a given index, the value of the chroma QP table for joint_cb_cr mode may be constrained by both the value of the chroma QP table for Cb and the value of the chroma QP table for Cr.

[0626] c. In one example, the values ​​of the chroma QP table for joint_cb_cr mode may be constrained to be between the values ​​of the chroma QP table for Cb and the values ​​of the chroma QP table for Cr (inclusive).

[0627] Related Deblocking

[0628] 45. MV comparison in deblocking may depend on whether an alternative half-pixel interpolation filter is employed (eg, indicated by hpelIfIdx in the JVET-O2001-vE specification).

[0629] d. In one example, blocks using different interpolation filters can be treated as having different MVs.

[0630] e. In one example, when an alternative half-pixel interpolation filter is involved, a constant offset may be added to the MV difference used for deblocking comparison.

[0631] General claims

[0632] 46. ​​Whether and / or how the above approach is applied may be based on:

[0633] a. Video content (e.g., screen content or natural content)

[0634] b. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture Header / Slice Header / Slice Group Header / Largest Codec Unit (LCU) / Codec Unit (CU) / LCU Line / LCU Group / TU / PU Block / Video Codec Unit

[0635] c. Location of CU / PU / TU / block / video codec unit

[0636] d. Block size of the current block and / or its neighboring blocks

[0637] e. Block shape of the current block and / or its neighboring blocks

[0638] f. Quantization parameter of the current block

[0639] g. Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV)

[0640] h. Codec tree structure (such as dual tree or single tree)

[0641] i. Slice / slice group type and / or picture type

[0642] j. Color components (e.g., may apply only to luma components or chroma components)

[0643] k. Time domain layer ID

[0644] l.Configuration file / level / layer

[0645] m. Whether the current block has an escape sample point.

[0646] i. In one example, the above method may be applied only when the current block has at least one escaped sample.

[0647] n. Whether the current block is encoded or decoded in lossless mode (for example, cu_transquant_bypass_flag)

[0648] ii. In one example, the above method may be applied only when the current block is not encoded in the lossless mode.

[0649] o. Whether to enable lossless codec (e.g., transquant_bypass_enabled, cu_transquant_bypass_flag)

[0650] 5. Examples

[0651] This embodiment is based on JVET-O2001-vE. Newly added text is enclosed in double bold double brackets, for example, {{a}} indicates that "a" has been added. Deleted text is enclosed in double bold square brackets, for example, [[b]] ​​indicates that "b" has been deleted.

[0652] 5.1 Example #1

[0653] Decoding process for palette mode

[0654] The input to this process is:

[0655] – Position (xCb, yCb), specifies the top left luminance sample of the current block relative to the top left luminance sample of the current picture,

[0656] – The variable startComp specifies the first color component in the palette table,

[0657] – The variable cIdx specifies the color component of the current block,

[0658] –Two variables nCbW and nCbH specify the width and height of the current block respectively.

[0659] The output of this process is an array recSamples[x][y] that specifies the reconstructed sample values ​​for the block, where x = 0..nCbW-1 and y = 0..nCbH-1.

[0660] Based on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows:

[0661] – If cIdx is equal to 0, then set nSubWidth to 1 and set nSubHeight to 1.

[0662] – Otherwise, set nSubWidth to SubWidthC and nSubHeight to SubHeightC.

[0663] The (nCbW x nCbH) block of the reconstructed sample array recSamples at position (xCb, yCb) is denoted by recSamples[x][y], where x=0..nCTbW-1 and y=0..nCbH-1, and for each x in the range 0 to nCbW-1 and each y in the range 0 to nCbH-1 the value of recSamples[x][y] is derived as follows:

[0664] – The variables xL and yL are derived as follows:

[0665] xL=palette_transpose_flag? x*nSubHeight:x*nSubWidth(8-268)

[0666] yL=palette_transpose_flag? y*nSubWidth:y*nSubHeight(8-269)

[0667] – The variable bIsEscapeSample is derived as follows:

[0668] – If PaletteIndexMap[xCb+xL][yCb+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then set bIsEscapeSample equal to 1.

[0669] – Otherwise, set bIsEscapeSample equal to 0.

[0670] – If bIsEscapeSample is equal to 0, then the following applies:

[0671] recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCb+xL][yCb+yL]](8-270)

[0672] – Otherwise, if cu_transquant_bypass_flag is equal to 1, then the following applies:

[0673] recSamples[x][y]=PaletteEscapeVal[cIdx][xCb+xL][yCb+yL](8-271)

[0674] – Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), then the following applies:

[0675] 1. The quantization parameter qP is derived as follows:

[0676] – If cIdx is equal to 0,

[0677] qP=Max(0,Qp′Y)(8-272)

[0678] – Otherwise, if cIdx is equal to 1,

[0679] qP=Max(0,Qp′Cb) (8-273)

[0680] – Otherwise (cIdx is equal to 2),

[0681] qP=Max(0,Qp′Cr) (8-274)

[0682] 2. Derived variable bitDepth is as follows:

[0683] bitDepth=(cIdx==0)? BitDepth Y :BitDepth C (8-275)

[0684] 3. [[Define the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.]]

[0685] 4. The following applies:

[0686] [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6 (8-276)]]

[0687] {{For component cIdx, set T equal to (internal_bit_depth - input_bit_depth) Nbits = max(T, (qP - 4) / 6)

[0688] – If Nbits is equal to T

[0689] recSamples[x][y]=PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <Nbits

[0690] -otherwise

[0691] recSamples[x][y]=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <Nbits)+(1<<(Nbits-1)}}

[0692] [[recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal)(8-277)]]

[0693] When one of the following conditions is true:

[0694] – cIdx is equal to 0 and numComps is equal to 1;

[0695] –cIdx is equal to 2;

[0696] The variable PredictorPaletteSize[startComp] and the array PredictorPaletteEntries are derived or modified as follows:

[0697]

[0698]

[0699] One requirement for bitstream conformance is that the value of PredictorPaletteSize[startComp] must be in the range of 0 to PaletteMaxPredictorSize (inclusive).

[0700] 5.2 Example #2

[0701] This embodiment describes palette index derivation.

[0702] Palette encoding and decoding semantics

[0703] [[The variable adjustedRefPaletteIndex is derived as follows:

[0704]

[0705]

[0706] When CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows:

[0707] if(CurrPaletteIndex>=adjustedRefPaletteIndex)CurrPaletteIndex++]]

[0708] Binarization process for palette_idx_idc

[0709] The input to this process is the request for binarization of the syntax element palette_idx_idc and the variable MaxPaletteIndex.

[0710] The output of this process is the binarization of the syntax element.

[0711] The variable cMax is derived as follows:

[0712] –[[If this procedure is called for the first time for the current block,]], then cMax is set equal to MaxPaletteIndex.

[0713] –[[Otherwise (this is not the first time this procedure has been called for the current block), then cMax is set equal to MaxPaletteIndex minus 1. ]]

[0714] The binarization for palette_idx_idc is derived by invoking the TB binarization process specified in clause 9.3.3.4 with the help of cMax.

[0715] 5.3 Example #3

[0716] Table 9-77 – Syntax elements and associated binarizations

[0717]

[0718] 8.4.5.3 Decoding process for palette mode

[0719] The input to this process is:

[0720] – Position (xCb, yCb), specifies the top left luminance sample of the current block relative to the top left luminance sample of the current picture,

[0721] – The variable startComp specifies the first color component in the palette table,

[0722] – The variable cIdx specifies the color component of the current block,

[0723] –Two variables nCbW and nCbH specify the width and height of the current block respectively.

[0724] The output of this process is an array recSamples[x][y] that specifies the reconstructed sample values ​​for the block, where x = 0..nCbW-1 and y = 0..nCbH-1.

[0725] Based on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows:

[0726] …

[0727] – Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), then the following applies:

[0728] 5. The quantization parameter qP is derived as follows:

[0729] – If cIdx is equal to 0,

[0730] qP=Max(0,Qp′Y)(8-272)

[0731] – Otherwise, if cIdx is equal to 1,

[0732] qP=Max(0,Qp′Cb) (8-273)

[0733] – Otherwise (cIdx is equal to 2),

[0734] qP=Max(0,Qp′Cr)(8-274)

[0735] 6. The variable bitDepth is derived as follows:

[0736] bitDepth=(cIdx==0)? BitDepth Y :BitDepth C (8-275)

[0737] 7. [[Define the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.]]

[0738] 8. The following applies:

[0739] [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6 (8-276)]]

[0740] {{shift=(max(QpPrimeTsMin,qP)-4) / 6

[0741] tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <shift)}}

[0742] recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal)(8-277)

[0743] 5.4 Example #4

[0744] copy_above_palette_indices_flag equal to 1 specifies that the palette index is equal to the palette index at the same position in the row above if horizontal traversal scanning is used, and the palette index is equal to the palette index at the same position in the left column if vertical traversal scanning is used. copy_above_palette_indices_flag equal to 0 specifies that an indication of the palette index of the sample is encoded or decoded into the bitstream representation or is inferred. ...

[0745] The variable adjustedRefPaletteIndex is derived as follows:

[0746]

[0747]

[0748] When CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows:

[0749] if(CurrPaletteIndex>=adjustedRefPaletteIndex)

[0750] CurrPaletteIndex++ (7-158)

[0751] 5.5 Example #5

[0752] Table 9-77 Syntax elements and associated binarization

[0753]

[0754] 8.4.5.3 Decoding process for palette mode

[0755] The input to this process is:

[0756] – Position (xCb, yCb), specifies the top left luminance sample of the current block relative to the top left luminance sample of the current picture,

[0757] – The variable startComp specifies the first color component in the palette table,

[0758] – The variable cIdx specifies the color component of the current block,

[0759] –Two variables nCbW and nCbH specify the width and height of the current block respectively.

[0760] The output of this process is an array recSamples[x][y] that specifies the reconstructed sample values ​​for the block, where x = 0..nCbW-1 and y = 0..nCbH-1.

[0761] Based on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows:

[0762] …

[0763] – Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), then the following applies:

[0764] 9. The quantization parameter qP is derived as follows:

[0765] – If cIdx is equal to 0,

[0766] qP=Max(0,Qp′Y)(8-272)

[0767] – Otherwise, if cIdx is equal to 1,

[0768] qP=Max(0,Qp′Cb) (8-273)

[0769] – Otherwise (cIdx is equal to 2),

[0770] qP=Max(0,Qp′Cr) (8-274)

[0771] 10. The variable bitDepth is derived as follows:

[0772] bitDepth=(cIdx==0)? BitDepth Y :BitDepth C (8-275)

[0773] 11.[[Define the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.]]

[0774] 12. The following applies:

[0775] [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6 (8-276)]]

[0776] {{shift=min(bitDepth-1,(max(QpPrimeTsMin,qP)-4) / 6)

[0777] tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <shift)}}

[0778] recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal)(8-277)

[0779] 5.6 Example #6

[0780] This embodiment shows a design that skips transform shifts to implement transform skipping, and is based on JVET-O2001-vE.

[0781] 8.7.2 Scaling and Transformation Process

[0782] The input to this process is:

[0783] – Luma position (xTbY, yTbY), specifies the top-left sample of the current luma transform block relative to the top-left luma sample of the current picture,

[0784] – The variable cIdx specifies the color component of the current block,

[0785] – variable nTbW that specifies the transform block width,

[0786] – The variable nTbH specifies the transform block height.

[0787] The output of this process is an (nTbW)x(nTbH) array of residual samples resSamples[x][y], where x=0..nTbW-1 and y=0..nTbH-1.

[0788] The variables bitDepth, bdShift, and tsShift are derived as follows:

[0789] bitDepth=(cIdx==0)? BitDepth Y :BitDepth C

[0790] (8-942)

[0791] bdShift=Max(20-bitDepth,0) (8-943)

[0792] [[tsShift=5+((Log2(nTbW)+Log2(nTbH)) / 2) (8 944)]]

[0794] The variable codedCIdx is derived as follows:

[0795] – If cIdx is equal to 0 or TuCResMode[xTbY][yTbY] is equal to 0, then set codedCIdx equal to cIdx.

[0796] – Otherwise, if TuCResMode[xTbY][yTbY] is equal to 1 or 2, then set codedCIdx equal to 1.

[0797] – Otherwise, set codedCIdx equal to 2.

[0798] Set the variable cSign equal to (1-2*slice_joint_cbcr_sign_flag).

[0799] The (nTbW)x(nTbH) array of residual samples resSamples is derived as follows.

[0800] 1. Invoke the scaling process for transform coefficients as specified in clause 8.7.3 with as input the transform block position (xTbY, yTbY), transform block width nTbW and transform block height nTbH, the color component variable cIdx set equal to codedCIdx, and the bit depth bitDepth of the current color component, and output is an (nTbW)x(nTbH) array d of scaled transform coefficients.

[0801] 2. The (nTbW)x(nTbH) array r of residual samples is derived as follows:

[0802] –[[If transform_skip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, the residual sample array value r[x][y] is derived as follows, where 0..nTbW-1, y = 0..nTbH-1:

[0803] r[x][y]=d[x][y]< <tsShift

[0804] (8-945)]]

[0805] – [[otherwise (transform_skip_flag[xTbY][yTbY] is equal to 0 or / and cIdx is not equal to 0), ]] invokes the transform process for scaled transform coefficients as specified in clause 8.7.4.1 with as input the transform block position (xTbY, yTbY), the transform block width nTbW and the transform block height nTbH, the colour component variables cIdx and the (nTbW)x(nTbH) array d of scaled transform coefficients, and outputs a (nTbW)x(nTbH) array r of residual samples.

[0806] 3. The intermediate residual sample res[x][y] is derived as follows, where x = 0..nTbW-1, y = 0..nTbH-1:

[0807] –{{If transform_skip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, then the following applies:

[0808] res[x][y]=d[x][y]}}

[0809] –{{Otherwise ((transform_skip_flag[xTbY][yTbY] is equal to 0 or cIdx is not equal to 0), then the following applies:}}

[0810] res[x][y]=(r[x][y]+(1<<(bdShift-1)))>>bdShift (8-946)

[0811] 4. The residual sample points resSamples[x][y] are derived as follows, where x = 0..nTbW-1 and y = 0..nTbH-1:

[0812] – If cIdx is equal to codedCIdx, then the following applies:

[0813] resSamples[x][y]=res[x][y] (8-947)

[0814] – Otherwise, if TuCResMode[xTbY][yTbY] is equal to 2, then the following applies:

[0815] resSamples[x][y]=cSign*res[x][y] (8-948)

[0816] – Otherwise, the following applies:

[0817] resSamples[x][y]=(cSign*res[x][y])>>1 (8-949)

[0818] 8.7.3 Scaling of Transform Coefficients

[0819] …

[0820] The variable rectNonTsFlag is derived as follows:

[0821] rect[[NonTs]]Flag=(((Log2(nTbW)+Log2(nTbH))&1)==1[[&&]] (8-955)

[0822] [[transform_skip_flag[xTbY][yTbY]=]]=0)

[0823] The variables bdShift, rectNorm, and bdOffset are derived as follows:

[0824] -{{If transform_skip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, then the following applies:

[0825] bdShift=10}}

[0826] -{{Otherwise, the following applies:}}

[0827] bdShift=bitDepth+((rect[[NonTs]]Flag?1:0)+ (8-956)

[0828] (Log2(nTbW)+Log2(nTbH)) / 2)-5+dep_quant_enabled_flagbdOffset=(1<<bdShift)> >1

[0829] (8-957)

[0830] The list levelScale[][] is defined as levelScale[j][k] = {{40, 45, 51, 57, 64, 72}, {57, 64, 72, 80, 90, 102}}, where j = 0..1, k = 0..5.

[0831] Set the (nTbW)x(nTbH) array dz equal to the (nTbW)x(nTbH) array TransCoeffLevel[xTbY][yTbY][cIdx].

[0832] For the derivation of the scaled transform coefficients d[x][y] (where x=0..nTbW-1, y=0..nTbH-1), the following applies:

[0833] – The intermediate scaling factor m[x][y] is derived as follows:

[0834] – Set m[x][y] equal to 16 if one or more of the following conditions are true:

[0835] –sps_scaling_list_enabled_flag is equal to 0.

[0836] –transform_skip_flag[xTbY][yTbY] is equal to 1.

[0837] – Otherwise, the following applies:

[0838] m[x][y]=

[0839] ScalingFactor[Log2(nTbW)][Log2(nTbH)][matrixId][x][y],

[0840] with matrixId as specified in Table 7-5

[0841] (8-958)

[0842] – The scaling factor ls[x][y] is derived as follows:

[0843] - If dep_quant_enabled_flag is equal to 1, then the following applies:

[0844] ls[x][y]=(m[x][y]*levelScale[rect[[NonTs]]Flag][(qP+1)%6])<<((qP+1) / 6) (8-959)

[0845] – Otherwise (dep_quant_enabled_flag is equal to 0), the following applies:

[0846] ls[x][y]=(m[x][y]*levelScale[rect[[NonTs]]Flag][qP%6])<<(qP / 6)(8-960)

[0847] – When BdpcmFlag[xTbY][yYbY] is equal to 1, modify dz[x][y] as follows:

[0848] – If BdpcmDir[xTbY][yYbY] is equal to 0 and x is greater than 0, then the following applies:

[0849] dz[x][y]=Clip3(CoeffMin,CoeffMax,dz[x-1][y]+dz[x][y])(8-961)

[0850] Otherwise, if BdpcmDir[xTbY][yYbY] is equal to 1 and y is greater than 0, then the following applies:

[0851] dz[x][y]=Clip3(CoeffMin,CoeffMax,dz[x][y-1]+dz[x][y])(8-962)

[0852] – The value of dnc[x][y] is derived as follows:

[0853] dnc[x][y]=(dz[x][y]*ls[x][y]+bdOffset)>>bdShift (8-963) – The scaled transform coefficients d[x][y] are derived as follows:

[0854] d[x][y]=Clip3(CoeffMin,CoeffMax,dnc[x][y]) (8-964)

[0855] 5.7 Example #7

[0856] This embodiment illustrates a design for signaling the number of palette indices.

[0857] 7.3.8.6 Palette encoding and decoding syntax

[0858]

[0859]

[0860]

[0861] Num_palette_indices{{_diff}}[[_minus1]] plus[[1]]({{MaxPaletteIndex+1}}) is the number of palette indices explicitly signaled or inferred for the current block.

[0862] {{Set NumPaletteIndices to (num_palette_indices_diff + MaxPaletteIndex + 1).}}

[0863] When num_palette_indices{{_diff}}[[_minus1]] is not present, it is inferred to be equal to 0.

[0864] {{The value of num_palette_indices_diff must be in the range of 0 to cbWidth*cbHeight – (MaxPaletteIndex+1), inclusive.}}

[0865] copy_above_indices_for_final_run_flag equal to 1 specifies that if horizontal traversal scanning is used, the palette index of the last position in the codec unit is copied from the palette index in the row above; if vertical traversal scanning is used, the palette index of the last position in the codec unit is copied from the palette index in the left column. copy_above_indices_for_final_run_flag equal to 0 specifies that the palette index of the last position in the codec unit is copied from PaletteIndexIdc[[[num_palette_indices_minus1]]{{NumPaletteIndices-1}}].

[0866] 9.5.3.13 Binarization process for num_palette_indices{{_diff}}[[_minus1]]

[0867] The input to this process is the request for binarization of the syntax element num_palette_indices{{_diff}}[[_minus1]] and MaxPaletteIndex.

[0868] The output of this process is the binarization of the syntax element.

[0869] The variable cRiceParam is derived as follows:

[0870] cRiceParam=3+((MaxPaletteIndex+1)>>3)

[0871] (9-26)

[0872] The variable cMax is derived from cRiceParam as follows:

[0873] cMax=4< <cRiceParam (9-27)

[0874] The binarization of the syntax element num_palette_indices{{_diff}}[[_minus1]] is the concatenation of the prefix binary string and (when present) the suffix binary string.

[0875] For the derivation of prefix binary strings, the following applies:

[0876] – The prefix value prefixVal of num_palette_indices{{_diff}}[[_minus1]] is derived as follows:

[0877] prefixVal=Min(cMax,num_palette_indices{{_diff}}[[_minus1]])(9-28)

[0878] – Specifies the prefix binary string by calling the TR binarization process as specified for prefixVal in clause 9.3.3.3 with variables cMax and cRiceParam as input.

[0879] When the prefix binary string is equal to a bit string with length 4 and all bits equal to 1, the suffix binary string exists and its derivation is as follows:

[0880] – The suffix value suffixVal of num_palette_indices{{_diff}}[[_minus1]] is derived as follows:

[0881] suffixVal=num_palette_indices{{_diff}}[[_minus1]]–cMax (9-29)

[0882] – The suffix binary string is specified by invoking the k-order EGk binarization process as specified for the binarization of suffixVal in clause 9.3.3.5 with Exponential Golomb order k set equal to cRiceParam+1.

[0883] Table 9-77 Syntax elements and associated binarization

[0884]

[0885] Table 9-82 – ctxInc assignment for syntax elements with context codec bits

[0886] 5.8 Example #8

[0887] This embodiment shows the design of staggered signaling in line-based CG palette mode.

[0888] This example is based on the draft provided in JVET-P2001-v4.

[0889]

[0890]

[0891]

[0892]

[0893] 5.9 Example #9

[0894] Changes based on JVET-P2001-vE.

[0895] 8.4.5.3 Decoding process for palette mode

[0896] The input to this process is:

[0897] – Position (xCbComp, yCbComp), specifies the upper left sample point of the current codec block relative to the upper left sample point of the current picture,

[0898] – The variable treeType specifies whether to use a unary tree or a binary tree. If a binary tree is used, specifies whether the current tree corresponds to the luminance component or the chrominance component.

[0899] – Variable cIdx, specifies the color component of the current block,

[0900] –Two variables nCbW and nCbH specify the width and height of the current codec block respectively.

[0901] The output of this process is an array recSamples[x][y] specifying the reconstructed sample values ​​for the block, where x = 0..nCbW-1, y = 0..nCbH-1.

[0902] Depending on the value of treeType, the variables startComp and numComps are derived as follows:

[0903] – If treeType is equal to SINGLE_TREE:

[0904] startComp=0 (444)

[0905] numComps=3 (445)

[0906] – Otherwise, treeType is equal to DUAL_TREE_LUMA:

[0907] startComp=0 (446)

[0908] numComps=1 (447)

[0909] – Otherwise, treeType is equal to DUAL_TREE_CHROMA:

[0910] startComp=1 (448)

[0911] numComps=2 (449)

[0912] Based on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows:

[0913] – If cIdx is greater than 0 and startComp is equal to 0, then set nSubWidth to SubWidthC and nSubHeight to SubHeightC.

[0914] – Otherwise, set nSubWidth to 1 and nSubHeight to 1.

[0915] The (nCbW x nCbH) block of the reconstructed sample array recSamples at position (xCbComp, yCbComp) is denoted by recSamples[x][y], where x=0..nCTbW-1 and y=0..nCbH-1, and for each x in the range 0 to nCbW-1 (inclusive) and each y in the range 0 to nCbH-1 (inclusive), the value of recSamples[x][y] is derived as follows:

[0916] – The variables xL, yL, xCbL and yCbL are derived as follows:

[0917] xL=x*nSubWidth(450)

[0918] yL=y*nSubHeight (451)

[0919] xCbL=xCbComp*nSubWidth (452)

[0920] yCbL=yCbComp*nSubHeight (453)

[0921] – The variable bIsEscapeSample is derived as follows:

[0922] – If PaletteIndexMap[xCbL+xL][yCbL+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then set bIsEscapeSample equal to 1.

[0923] – Otherwise, set bIsEscapeSample equal to 0.

[0924] – If bIsEscapeSample is equal to 0, then the following applies:

[0925] recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCbL+xL][yCbL+yL]](454)

[0926] – Otherwise (bIsEscapeSample is equal to 1), the following ordered steps apply:

[0927] 1. The quantization parameter qP is derived as follows:

[0928] – If cIdx is equal to 0,

[0929] qP=Max(QpPrimeTsMin,Qp′Y) (455)

[0930] – Otherwise, if cIdx is equal to 1,

[0931] qP=Max(QpPrimeTsMin,Qp′Cb) (456)

[0932] – Otherwise (cIdx is equal to 2),

[0933] qP=Max(QpPrimeTsMin,Qp′Cr) (457)

[0934] 2. Define the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.

[0935] 3. The following applies:

[0936] {{shift=Min(bitDepth–1,(QpPrimeTsMin–4) / 6)}}[[tmpVal=(PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6(458)]]

[0937] {{tmpVal=((PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]< <shift)*

[0938] levelScale[(qP–QpPrimeTsMin+4)%6])<<((qP–QpPrimeTsMin+4) / 6)+32)>>6(458)}}

[0939] recSamples[x][y]=Clip3(0,(1< <BitDepth)-1,tmpVal)(459)

[0940] 5.10 Example #10

[0941] Changes based on JVET-P2001-vE.

[0942] 8.4.5.3 Decoding process for palette mode

[0943] The input to this process is:

[0944] – Position (xCbComp, yCbComp), specifies the upper left sample point of the current codec block relative to the upper left sample point of the current picture,

[0945] – The variable treeType specifies whether to use a unary tree or a binary tree. If a binary tree is used, specifies whether the current tree corresponds to the luminance component or the chrominance component.

[0946] – Variable cIdx, specifies the color component of the current block,

[0947] –Two variables nCbW and nCbH specify the width and height of the current codec block respectively.

[0948] The output of this process is an array recSamples[x][y] specifying the reconstructed sample values ​​for the block, where x = 0..nCbW-1, y = 0..nCbH-1.

[0949] Depending on the value of treeType, the variables startComp and numComps are derived as follows:

[0950] – If treeType is equal to SINGLE_TREE:

[0951] startComp=0 (444)

[0952] numComps=3 (445)

[0953] – Otherwise, treeType is equal to DUAL_TREE_LUMA:

[0954] startComp=0 (446)

[0955] numComps=1 (447)

[0956] – Otherwise, treeType is equal to DUAL_TREE_CHROMA:

[0957] startComp=1 (448)

[0958] numComps=2 (449)

[0959] Based on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows:

[0960] – If cIdx is greater than 0 and startComp is equal to 0, then set nSubWidth to SubWidthC and nSubHeight to SubHeightC.

[0961] – Otherwise, set nSubWidth to 1 and nSubHeight to 1.

[0962] The (nCbW x nCbH) block of the reconstructed sample array recSamples at position (xCbComp, yCbComp) is denoted by recSamples[x][y], where x=0..nCTbW-1 and y=0..nCbH-1, and for each x in the range 0 to nCbW-1 (inclusive) and each y in the range 0 to nCbH-1 (inclusive), the value of recSamples[x][y] is derived as follows:

[0963] – The variables xL, yL, xCbL and yCbL are derived as follows:

[0964] xL=x*nSubWidth(450)

[0965] yL=y*nSubHeight (451)

[0966] xCbL=xCbComp*nSubWidth (452)

[0967] yCbL=yCbComp*nSubHeight (453)

[0968] – The variable bIsEscapeSample is derived as follows:

[0969] – If PaletteIndexMap[xCbL+xL][yCbL+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then set bIsEscapeSample equal to 1.

[0970] – Otherwise, set bIsEscapeSample equal to 0.

[0971] – If bIsEscapeSample is equal to 0, then the following applies:

[0972] recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCbL+xL][yCbL+yL]] (454)

[0973] – Otherwise (bIsEscapeSample is equal to 1), the following ordered steps apply:

[0974] 4. The quantization parameter qP is derived as follows:

[0975] – If cIdx is equal to 0,

[0976] qP=Max(QpPrimeTsMin,Qp′Y) (455)

[0977] – Otherwise, if cIdx is equal to 1,

[0978] qP=Max(QpPrimeTsMin,Qp′Cb) (456)

[0979] – Otherwise (cIdx is equal to 2),

[0980] qP=Max(QpPrimeTsMin,Qp′Cr) (457)

[0981] 5. Define the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.

[0982] 6. The following applies:

[0983] {{shift=Min(bitDepth–1,(QpPrimeTsMin–4) / 6)}}[[tmpVal=(PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6(458)]]

[0984] {{qP'=Max(0,qP–6*shift)

[0985] tmpVal=((PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]< <shift)*

[0986] levelScale[qP'%6])<<(qP' / 6)+32)>>6 (458)}}

[0987] recSamples[x][y]=Clip3(0,(1< <BitDepth)-1,tmpVal)(459)

[0988] Fig. 9 900 is a block diagram of a video processing device 900. Device 900 can be used to implement one or more of the methods described herein. Device 900 can be embodied in a smart phone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. Device 900 may include one or more processors 902, one or more memories 904, and video processing hardware 906. (One or more) processors 902 can be configured to implement one or more methods described in this document. (One or more) memories 904 can be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 906 can be used to implement some of the techniques described in this document in hardware circuits. In some embodiments, hardware 906 can be at least partially within processor 902 (e.g., a graphics coprocessor).

[0989] Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or mode. In one example, when a video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of a video block, but will not necessarily modify the resulting bitstream based on the use of the tool or mode. That is, when a video processing tool or mode is enabled based on a decision or decision, the conversion from a video block to a bitstream representation of a video will use the video processing tool or mode. In another example, when a video processing tool or mode is enabled, a decoder will process the bitstream knowing that the bitstream has been modified based on the video processing tool or mode. That is, the conversion from the bitstream representation of a video to a video block will be performed using a video processing tool or mode enabled based on a decision or decision.

[0990] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In one example, when a video processing tool or mode is disabled, the encoder will not use the tool or mode in converting video blocks to a bitstream representation of the video. In another example, when a video processing tool or mode is disabled, the decoder will process the bitstream knowing that no modifications have been made to the bitstream using the video processing tool or mode that was enabled based on the decision or determination.

[0991] Fig.10 1 is a block diagram illustrating an exemplary video processing system 1000 in which the various techniques disclosed herein may be implemented. Various embodiments may include some or all of the components of system 1000. System 1000 may include an input 1002 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8-bit or 10-bit multi-component pixel values, or may have a compressed or encoded format. Input 1002 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a passive optical network (PON), and wireless interfaces such as Wi-Fi or a cellular interface.

[0992] System 1000 may include coding component 1004, which may implement various encodings or coding methods described in this document. Coding component 1004 may reduce the average bit rate of the video from input 1002 to the output of coding component 1004 to generate a codec representation of the video. Therefore, coding techniques are sometimes referred to as video compression or video transcoding techniques. The output of coding component 1004 may be stored or may be transmitted by a connected communication, as represented by component 1006. The storage or communication bitstream (or encoded) representation of the video received at input 1002 may be used by component 1008 to generate pixel values ​​or send to a displayable video of display interface 1010. The processing of generating a user-viewable video from a bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "coding" operations or tools, it should be understood that codec tools or operations are used at encoders, and the corresponding decoding tools or operations of the reverse coding results will be performed by decoders.

[0993] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High Definition Multimedia Interface (HDMI) or Displayport, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described in this document may be embodied in various electronic devices, such as mobile phones, laptops, smart phones, or other devices capable of performing digital data processing and / or video display.

[0994] Fig.11 is a block diagram illustrating an exemplary video encoding system 100 that may utilize the techniques of this disclosure.

[0995] like Fig.11 As shown in FIG. 1 , a video encoding system 100 may include a source device 110 and a destination device 120. The source device 110, which may be referred to as a video encoding device, generates encoded video data. The destination device 120, which may be referred to as a video decoding device, may decode the encoded video data generated by the source device 110.

[0996] Source device 110 may include a video source 112 , a video encoder 114 , and an input / output (I / O) interface 116 .

[0997] The video source 112 may include a source, such as a video capture device, an interface for receiving video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of such sources. The video data includes one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bit stream. The bit stream may include a sequence of bits that form a codec representation of the video data. The bit stream may include coded pictures and associated data. The coded pictures are codec representations of pictures. The associated data may include sequence parameter sets, picture parameter sets, and other grammatical structures. The I / O interface 116 may include a modulator / demodulator (modem) and / or a transmitter. The coded video data may be directly transmitted to the destination device 120 via the interface 116 through the network 130a. The coded video data may also be stored on a storage medium / server 130b for access by the destination device 120.

[0998] Destination device 120 may include an I / O interface 126 , a video decoder 124 , and a display device 122 .

[0999] The I / O interface 126 may include a receiver and / or a modem. The I / O interface 126 may obtain encoded video data from the source device 110 or the storage medium / server 130b. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or may be external to the destination device 120 configured to interface with an external display device.

[1000] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, the Versatile Video Coding (VVM) standard, and other current and / or future standards.

[1001] Fig.12 is a block diagram of an example of a video encoder 200, which may be Fig.11 1. The video encoder 114 in the system 100 is shown in FIG.

[1002] Video encoder 200 may be configured to perform any or all of the techniques of this disclosure. Fig.12 In the example of , video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared between various components of video encoder 200. In some examples, a processor can be configured to perform any or all of the techniques of this disclosure.

[1003] The functional components of the video encoder 200 may include: a segmentation unit 201, a prediction unit 202 which may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a cache 213 and an entropy coding and decoding unit 214.

[1004] In other examples, the video encoder 200 may include more, fewer, or different functional components. In an example, the prediction unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode in which at least one reference picture is a picture in which the current video block is located.

[1005] Furthermore, some components (such as the motion estimation unit 204 and the motion compensation unit 205) may be highly integrated, but in Fig.12 are shown separately for the purpose of explanation.

[1006] The partitioning unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

[1007] The mode selection unit 203 may select one of the codec modes (e.g., intra or inter), for example, based on the error result; and provide the resulting intra or inter codec block to the residual generation unit 207 to generate residual block data, and to the reconstruction unit 212 to reconstruct the codec block for use as a reference picture. In some examples, the mode selection unit 203 may select a combined intra and inter prediction (CIIP) mode, in which the prediction is based on an inter prediction signal and an intra prediction signal. The mode selection unit 203 may also select a motion vector resolution (e.g., sub-pixel or integer pixel precision) for the block in the case of inter prediction.

[1008] In order to perform inter-frame prediction on the current video block, the motion estimation unit 204 may generate motion information of the current video block by comparing the current video block with one or more reference frames from the cache 213. The motion compensation unit 205 may determine a predicted video block of the current video block based on the motion information and decoded samples of pictures from the cache 213 other than the picture associated with the current video block.

[1009] The motion estimation unit 204 and the motion compensation unit 205 may perform different operations for the current video block, for example, depending on whether the current video block is an I slice, a P slice, or a B slice.

[1010] In some examples, the motion estimation unit 204 may perform unidirectional prediction on the current video block, and the motion estimation unit 204 may search the reference picture of list 0 or list 1 to obtain the reference video block of the current video block. Thereafter, the motion estimation unit 204 may generate a reference index indicating the reference picture in list 0 or list 1 that contains the reference video block and a motion vector indicating the spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, the prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate a predicted video block of the current block based on the reference video block indicated by the motion information of the current video block.

[1011] In other examples, the motion estimation unit 204 may perform unidirectional prediction on the current video block, and the motion estimation unit 204 may search the reference pictures in list 0 to obtain the reference video block of the current video block, and may also search the reference pictures in list 1 to obtain another reference video block of the current video block. Afterwards, the motion estimation unit 204 may generate reference indexes indicating the reference pictures in list 0 and list 1 that contain the reference video blocks and motion vectors indicating the spatial displacement between the reference video blocks and the current video block. The motion estimation unit 204 may output the reference indexes and motion vectors of the current video block as the motion information of the current video block. The motion compensation unit 205 may generate a predicted video block of the current block based on the reference video blocks indicated by the motion information of the current video block.

[1012] In some examples, motion estimation unit 204 may output the entire motion information set for use in a decoding process by a decoder.

[1013] In some examples, motion estimation unit 204 does not output the entire set of motion information for the current video. Instead, motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

[1014] In one example, motion estimation unit 204 may indicate a value in a syntax structure associated with the current video block that indicates to video decoder 300 that the current video block has the same motion information as another video block.

[1015] In another example, the motion estimation unit 204 may indicate another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[1016] As discussed above, the video encoder 200 may predictively signal motion vectors. Two examples of predictive signaling techniques that may be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and Merge mode signaling.

[1017] The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a prediction video block and various syntax elements.

[1018] The residual generation unit 207 may generate residual data for the current video block by subtracting (eg, indicated by a subtraction sign) the predicted video block of the current video block from the current video block. The residual data for the current video block may include residual video blocks corresponding to different sample components of samples in the current video block.

[1019] In other examples, there may be no residual data for the current video block, for example in skip mode, and the residual generation unit 207 may not perform a subtraction operation.

[1020] Transform processing unit 208 may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to the residual video block associated with the current video block.

[1021] After transform processing unit 208 generates a transform coefficient video block associated with the current video block, quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameters (QPs) associated with the current video block.

[1022] The inverse quantization unit 210 and the inverse transform unit 211 may respectively apply inverse quantization and inverse transform to the transform coefficient video block, thereby reconstructing the residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to the corresponding sample points of one or more prediction video blocks generated by the free prediction unit 202, thereby generating a reconstructed video block associated with the current block for storage in the buffer 213.

[1023] After the reconstruction unit 212 reconstructs the video block, an in-loop filtering operation may be performed to reduce video blocking artifacts within the video block.

[1024] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives the data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy coded data and output a bitstream containing the entropy coded data.

[1025] Fig.13 is a block diagram showing an example of a video decoder 300, which may be Fig.11 1. The video decoder 114 in the system 100 is shown in FIG.

[1026] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. Fig.13 In the example of , video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared between various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques of this disclosure.

[1027] exist Fig.13 In the example of FIG. 3 , the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra-frame prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306, and a buffer 307. The video decoder 300 may (in some examples) perform operations generally similar to those associated with the video encoder 200 ( Fig.12 ) is a decoding pass that is the inverse of the encoding pass described.

[1028] The entropy decoding unit 301 may retrieve a coded bitstream. The coded bitstream may include entropy coded video data (e.g., a coded block of video data). The entropy decoding unit 301 may decode the entropy coded video data, and the motion compensation unit 302 may determine motion information including motion vectors, motion vector predictions, reference picture list indexes, and other motion information from the entropy decoded video data. The motion compensation unit 302 may determine such information, for example, by performing AMVP and merge modes.

[1029] The motion compensation unit 302 may generate a motion compensated block, possibly performing interpolation based on an interpolation filter. An identifier of an interpolation filter used in conjunction with sub-pixel precision may be included in a syntax element.

[1030] Motion compensation unit 302 may calculate interpolation values ​​for sub-integer pixels of a reference block using interpolation filters as used by video encoder 200 during encoding of the video block. Motion compensation unit 302 may determine the interpolation filters used by video encoder 200 based on received syntax elements and use these interpolation filters to generate a prediction block.

[1031] The motion compensation unit 302 can use some information in the syntax information to determine the size of the blocks used for encoding and decoding frames and / or slices of the encoded video sequence, partition information describing how each macroblock of the picture of the encoded video sequence is partitioned, a mode indicating how to encode each partition, one or more reference frames (and reference frame lists) for each inter-frame codec block, and other information to decode the encoded video sequence.

[1032] The intra prediction unit 303 may form a prediction block from neighboring blocks using, for example, an intra prediction mode received in a bitstream. The inverse quantization unit 303 inversely quantizes, i.e., inverse quantizes, the quantized video block coefficients provided in the bitstream and decoded by the entropy decoding unit 301. The inverse transform unit 303 applies an inverse transform.

[1033] The reconstruction unit 306 may sum the residual block with the corresponding prediction block generated by the motion compensation unit 202 or the intra prediction unit 303 to form a decoded block. If desired, a deblocking filter may also be applied to filter the decoded block to remove blockiness artifacts. The decoded video block is then stored in a buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction and also generates a decoded video for presentation on a display device.

[1034] In some embodiments, the following methods are based on the examples and embodiments listed above. In the examples, it is possible to use (but not limited to) Figure 9-13 The embodiments shown are used to implement these methods.

[1035] Fig.14 14 is a flowchart of an exemplary method for video processing. As shown therein, method 1400 includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (1410), wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec, wherein binarization of escape symbols of the current video block uses a K-order Exponential Golomb (EG) code, wherein K is a non-negative integer not equal to three, and wherein the palette mode codec represents the current video block using a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1036] Fig.1515 is a flow chart of an exemplary method for video processing. As shown therein, method 1500 includes: performing conversion between a video including one or more video regions including one or more video blocks and a bitstream representation of the video (1510), wherein the bitstream representation conforms to a format rule for encoding and decoding a current video block of the one or more video blocks using a palette mode codec tool, wherein binarization of escape symbols for the current video block uses fixed length binarization, wherein the palette mode codec tool represents the current video block using a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1037] Fig.16 16 is a flow chart of an exemplary method for video processing. As shown therein, method 1600 includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (1610), wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec tool, wherein binarization of escape symbols of the current video block uses a variable length codec, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1038] Fig.17 17 is a flow chart of an exemplary method for video processing. As shown therein, method 1700 includes: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (1710), wherein the conversion includes applying a quantization and an inverse quantization process to the current video block, wherein the bitstream representation conforms to a format rule, wherein the format rule configures the application of the quantization or inverse quantization process based on whether the current video block is encoded using a palette mode codec tool, and wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1039] Fig.18 18 is a flow chart of an exemplary method for video processing. As shown therein, method 1800 includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (1810), wherein the bitstream representation conforms to a format rule for representing a current video block encoded and decoded using a palette mode codec tool so as to quantize and / or inverse quantize escape symbols of the current video block using a binary shift operation, wherein the palette mode codec tool represents the current video block using a palette having representative color values, and wherein the escape symbols are used for samples of the current video block that were not encoded and decoded using the representative color values.

[1040] Fig.19 1900 is a flowchart of an exemplary method for video processing. As shown therein, the method 1900 includes: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (1910), wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec tool, wherein one or more palette indexes of the palette mode codec tool are encoded and decoded without using a reference index, and wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1041] Fig. 20 2000 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2010), wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec tool and constraining the derivation between indices of escape symbols and indices of non-escape symbols, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1042] Fig.21 21 is a flowchart of an exemplary method for video processing. As shown therein, the method 2100 includes: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2110), wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec tool, wherein a derived palette index of the palette mode codec tool has a maximum value, and wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1043] Fig. 22 2200 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2210), wherein the bitstream representation conforms to a format rule for representing a current video block encoded and decoded using a palette mode codec using a syntax element including an escape symbol, wherein a value of an index indicating the escape symbol is not changed for each of the one or more video regions, wherein the palette mode codec represents the current video block using a palette with representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded and decoded using the representative color values.

[1044] Fig.23 2300 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2310), wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec tool using syntax elements encoded based on a current index and a reference index, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1045] Fig.24 2400 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2410), wherein the bitstream representation conforms to a format rule for representing a current video block encoded using a palette mode codec using syntax elements including an escape symbol that is predictively encoded, wherein the palette mode codec represents the current video block using a palette having representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded using the representative color values.

[1046] Fig.25 25 is a flowchart of an exemplary method for video processing. As shown therein, method 2500 includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2510), wherein the bitstream representation conforms to a format rule for representing the current video block encoded using a palette mode codec tool using a syntax element for run-length encoding and decoding with a context based on a palette index for indexing a palette entry, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1047] Fig.26 2600 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2610), wherein the bitstream representation conforms to a format rule for representing the current video block encoded and decoded using a palette mode codec using a syntax element including a current palette index that is independent of a previous palette index signaling, wherein the palette mode codec represents the current video block using a palette of representative color values.

[1048] Fig. 2727 is a flowchart of an exemplary method for video processing. As shown therein, method 2700 includes: determining a first neighboring video block for predicting a quantization parameter of a current video block of one or more video regions of a video based on an alignment rule and a second neighboring video block for predictively determining a codec mode of the current video block (2710); performing conversion between the video and a bitstream representation of the video based on the determination (2720).

[1049] Fig.28 2800 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2810), wherein the bitstream representation conforms to a format rule that uses syntax elements including a block-level quantization parameter (QP) difference to represent a current video block encoded using a palette mode codec tool regardless of whether the current video block includes an escape symbol, wherein the palette mode codec tool represents the current video block using a palette having representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded using the representative color values.

[1050] Fig.29 2900 includes performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (2910), wherein the bitstream representation conforms to a format rule for representing the current video block encoded and decoded using a palette mode codec using syntax elements including one or more coded block flags (CBFs) for a palette section, wherein the palette mode codec represents the current video block using a palette of representative color values.

[1051] Fig.30 3000 includes: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (3010), wherein the bitstream representation conforms to a format rule for representing a current video block encoded and decoded using a palette mode codec using a syntax element including one or more palette indices, wherein the number of the one or more palette indices (NumPltIdx) is greater than or equal to K, wherein the palette mode codec represents the current video block using a palette of representative color values, and wherein K is a positive integer.

[1052] Fig.3131 is a flowchart of an exemplary method for video processing. As shown therein, the method 3100 includes: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (3110), wherein the bitstream representation conforms to a format rule for representing the current video block encoded and decoded using a palette mode codec tool using a syntax element based on a maximum size of a palette of the current block, a size of the current video block, use of a lossless mode, or a quantization parameter (QP), wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1053] Fig.32 3200 includes: determining to encode and decode the current video block using a block-based differential pulse codec modulation (BDPCM) mode and divide the current video block into a plurality of transform blocks or sub-blocks for conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (3210); and based on the determination, as part of performing the conversion, performing residual prediction at the block level and including one or more residuals into the bitstream representation at the sub-block or transform block level (3220).

[1054] Fig.33 3300 is a flowchart of an exemplary method for video processing. As shown therein, the method 3300 includes: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video (3310), wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a line-based coefficient group (CG) palette mode, wherein the line-based CG palette mode represents a palette of representative color values ​​used by multiple fragments of each codec unit (CU) of the current video block.

[1055] The solutions described below may be implemented together with the additional techniques described in the items listed in the previous sections as preferred features of some embodiments (eg, item 1).

[1056] 1. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for encoding and decoding the current video block using a palette mode codec, wherein binarization of escape symbols of the current video block uses a K-order Exponential Golomb (EG) code, wherein K is a non-negative integer not equal to three, and wherein the palette mode codec represents that the current video block uses a palette with representative color values, and wherein escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1057] 2. The method according to solution 1, wherein K=0.

[1058] 3. The method according to solution 1, wherein K=1.

[1059] 4. The method according to solution 1, wherein K=2.

[1060] 5. A video processing method, comprising: performing conversion between a video including one or more video regions including one or more video blocks and a bitstream representation of the video, wherein the bitstream representation complies with format rules for encoding and decoding a current video block of the one or more video blocks using a palette mode codec tool, wherein binarization of escape symbols for the current video block uses fixed length binarization, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using representative color values.

[1061] 6. The method according to solution 5, wherein the fixed-length binarization uses N bits, wherein N is an integer greater than one.

[1062] 7. The method of solution 6, wherein N is based on an internal bit depth.

[1063] 8. The method of solution 6, wherein the value of N is signaled in a slice sub-picture, a slice, a picture or a video.

[1064] 9. The method of solution 6, wherein N is based on a quantization parameter.

[1065] 10. The method of solution 9, wherein N is based on a function (f()) of a quantization parameter (Qp), denoted as f(Qp).

[1066] 11. The method of solution 9, wherein N is set to (ibd-max(16,(Qp-4) / 6)), where ibd is the internal bit depth.

[1067] 12. The method of solution 9, wherein N is set to (ibd - max(QpPrimeTsMin, (Qp-4) / 6)), where ibd is the intra bit depth and QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode.

[1068] 13. The method of solution 9, wherein N is set to max(A,(ibd-max(16,(QpPrimeTsMin-4) / 6))), and wherein ibd is the internal bit depth, QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode, and A is a non-negative integer.

[1069] 14. The method according to solution 13, wherein A=0 or A=1.

[1070] 15. The method according to any of solutions 9 to 14, wherein the quantization parameter is the sum of the quantization parameter of the slice of the video and a constant value, wherein the constant value is an integer.

[1071] 16. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation complies with format rules for encoding and decoding the current video block using a palette mode codec tool, wherein binarization of escape symbols of the current video block uses variable length codec, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1072] 17. The method of solution 16, wherein the variable length codec excludes 3rd order exponential Golomb codes.

[1073] 18. The method of solution 16, wherein the variable length codec is a truncated binary (TB) code with an input parameter K, wherein K is an integer.

[1074] 19. A method according to solution 18, wherein K is based on (a) a message signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header, a maximum codec unit (LCU) row, an LCU group, or a brick; (b) an internal bit depth; (c) an input bit depth; (d) a difference between the internal bit depth and the input bit depth; (e) a dimension of a current video block; (f) a current quantization parameter of a current video block; (g) an indication of a color format of the video; (h) a codec tree structure; or (i) a color component of the video.

[1075] 20. The method of solution 5, wherein multiple values ​​of the escaped symbol are signaled using multiple binarization methods.

[1076] 21. A video processing method, comprising: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the conversion includes applying a quantization and an inverse quantization process to the current video block, wherein the bitstream representation complies with a format rule, the format rule configuring the application of the quantization or inverse quantization process based on whether the current video block is encoded and decoded using a palette mode codec tool, and wherein the palette mode codec tool represents that the current video block uses a palette of representative color values.

[1077] 22. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule for representing a current video block encoded and decoded using a palette mode codec tool so as to quantize and / or inverse quantize escape symbols of the current video block using a binary shift operation, wherein the palette mode codec tool represents the current video block using a palette with representative color values, and wherein escape symbols are used for samples of the current video block that are not encoded and decoded using representative color values.

[1078] 23. The method of solution 22, wherein quantization corresponds to right bit shifting.

[1079] 24. A method according to solution 22, wherein the escaped symbol is encoded and decoded into f(p,Qp), where f() is a function, p is an input symbol value, and Qp is a derived quantization parameter representing a corresponding color component of the current video block.

[1080] 25. The method of solution 24, wherein f is defined as p>>g(Qp).

[1081] 26. A method according to solution 24, wherein f is defined as (p+(1<<(g(QP)-1)))>>g(Qp).

[1082] 27. The method according to solution 24, wherein f is defined as clip(0,(1< <bd)-1,(p+(1<<(g(QP)-1)))> >g(Qp)), where clip(x,min,max) is the clipping function, and where x, min, and max are integers.

[1083] 28. The method of solution 22, wherein the escape symbol is encoded and decoded into h(p), where h() is a function and p is an input value symbol.

[1084] 29. A method according to solution 28, wherein h is defined as p>>N, and N is a non-negative integer.

[1085] 30. The method of solution 28, wherein h is defined as (p+(1<<(N-1)))>>N, and wherein N is a non-negative integer.

[1086] 31. The method according to solution 29 or 30, wherein when cu_transquant_bypass_flag=1, N=0.

[1087] 32. The method of solution 29 or 30, wherein, when cu_transquant_bypass_flag=1, N=(bd-ibd), wherein bd is the internal bit depth and ibd is the input bit depth.

[1088] 33. A method according to solution 28, wherein h is defined as clip(0,(1<<(bd-N)-1,p>>N), wherein bd is the internal bit depth of the current color component of the current video block, and N is a non-negative integer, wherein clip(x,min,max) is a clipping function, and wherein x, min, and max are integers.

[1089] 34. A method according to solution 28, wherein h is defined as clip(0,(1<<(bd-N)-1,(p+(1<<(N-1)))>>N), wherein bd is the internal bit depth of the current color component of the current video block, and N is a non-negative integer, wherein clip(x,min,max) is a clipping function, and wherein x, min, and max are integers.

[1090] 35. A method according to any of solutions 29 to 34, wherein N is in the range [0, (bd-1)], and wherein bd is the internal bit depth of the current color component of the current video block.

[1091] 36. The method of solution 22, wherein quantization corresponds to left bit shifting.

[1092] 37. A method according to solution 36, wherein the escaped symbols are inversely quantized into f(p,Qp), wherein f() is a function, p is the decoded escaped symbols, and Qp is a derived quantization parameter representing the corresponding color component of the current video block.

[1093] 38. A method according to solution 37, wherein f is defined as p>>g(Qp).

[1094] 39. The method according to solution 36, wherein the escape symbol is inverse-quantized to f(p, Qp), where f() is a function, p is the decoded escape symbol, and Qp is the derived quantization parameter representing the corresponding color component of the current video block.

[1095] 40. The method according to solution 39, wherein f is defined as clip(0, (1 << bd)-1, p << g(Qp)), where bd is the internal bit depth of the current color component of the current video block, and where clip(x, min, max) is a clip function, and where x, min, and max are integers.

[1096] 41. The method according to solution 27, 33, 34, or 40, wherein the clip function clip(x, min, max) is defined as:

[1097]

[1098] 42. The method according to solution 36, wherein the escape symbol is reconstructed as h(p), where h() is a function, and p is the decoded escape symbol.

[1099] 43. The method according to solution 42, wherein h is defined as p << N, and N is a non-negative integer.

[1100] 44. The method according to solution 42 or 43, wherein when cu_transquant_bypass_flag = 1, N = 0.

[1101] 45. The method according to solution 42 or 43, wherein when cu_transquant_bypass_flag = 1, N = (bd - ibd), where bd is the internal bit depth, and ibd is the input bit depth.

[1102] 46. The method according to solution 42 or 43, wherein N = (max(QpPrimeTsMin, qP)-4) / 6, where qP is the decoded quantization parameter, and QpPrimeTsMin is the minimum allowed quantization parameter for the transform skip mode.

[1103] 47. The method according to any of solutions 43 to 46, wherein N is further clipped to min(bd - 1, N), and where bd is the internal bit depth of the current color component of the current video block.

[1104] 48. The method according to any of solutions 43 to 47, wherein N is in the range [0, (bd-1)], and wherein bd is the internal bit depth of the current color component of the current video block.

[1105] 49. The method according to solution 36, wherein the reconstruction offset of the escape symbol is based on bit depth information.

[1106] 50. The method according to solution 49, wherein the bit depth information includes the difference between the internal bit depth and the input bit depth (denoted as ΔBD).

[1107] 51. The method according to solution 50, wherein when K ≤ ΔBD, the reconstruction offset is equal to p << K, where p is the decoded escape symbol and K is an integer.

[1108] 52. The method according to solution 49, wherein when K ≤ T0, the reconstruction offset is equal to p << K, where p is the decoded escape symbol and T0 is an integer.

[1109] 53. The method according to solution 50, wherein T0 = 2.

[1110] 54. The method according to solution 50, wherein the reconstruction offset is equal to (p << K) + ((1 << (K - 1)) >> ΔBD << ΔBD), where p is the decoded escape symbol and K is an integer.

[1111] 55. The method according to solution 50, wherein at sequence level, picture level, slice level, tile level, or sub-picture level, Δ BD is signaled into the bitstream representation.

[1112] 56. The method according to any of solutions 22 to 55, wherein the escape symbol context is coded and decoded.

[1113] 57. The method according to any of solutions 22 to 55, wherein the escape symbol bypass is coded and decoded.

[1114] 58. The method according to any of solutions 25-27, 38 or 40, wherein g(Qp) is defined as (Qp - 4) / 6.

[1115] 59. The method according to any of solutions 25-27, 38 or 40, wherein g(Qp) is defined as (max(M, Qp) - 4) / 6, where M is an integer.

[1116] 60. The method of solution 59, wherein M is signaled in a sequence parameter set (SPS).

[1117] 61. A method according to any of solutions 58 to 60, wherein g(Qp) is in the range [0, (bd-1)], and wherein bd is the internal bit depth of the current color component of the current video block.

[1118] 62. A video processing method, comprising: performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation complies with format rules for encoding and decoding the current video block using a palette mode codec tool, wherein one or more palette indexes of the palette mode codec tool are encoded and decoded without using a reference index, and wherein the palette mode codec tool represents a palette of representative color values ​​used by the current video block.

[1119] 63. A method according to solution 62, wherein the binarization of the one or more palette indexes is a truncated binary code (TB) code with the maximum palette index as the binarization input parameter.

[1120] 64. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to format rules for encoding and decoding the current video block using a palette mode codec tool and constraining the derivation between indices of escape symbols and indices of non-escape symbols, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein escape symbols are used for samples of the current video block that are not encoded using representative color values.

[1121] 65. A method according to solution 64, wherein the index of an escaped symbol is not allowed to be deduced from the index of a non-escaped symbol.

[1122] 66. A method according to solution 64, wherein the index of a non-escaped symbol is not allowed to be deduced from the index of an escaped symbol.

[1123] 67. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation complies with format rules for encoding and decoding the current video block using a palette mode codec tool, wherein a derived palette index of the palette mode codec tool has a maximum value, and wherein the palette mode codec tool represents a palette of representative color values ​​used by the current video block.

[1124] 68. A method according to solution 67, wherein the maximum value is the current palette table size.

[1125] 69. A method according to solution 67, wherein the maximum value is the current palette table size excluding indexes for one or more escape symbols, and wherein escape symbols among the one or more escape symbols are used for samples of the current video block that are not encoded using representative color values.

[1126] 70. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation complies with format rules for using syntax elements including escape symbols to represent the current video block encoded and decoded using a palette mode codec tool, wherein the value of an index indicating the escape symbol is not changed for each of the one or more video regions, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded and decoded using the representative color values.

[1127] 71. The method of solution 70, wherein the index is equal to MaxPaletteIndex.

[1128] 72. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of using syntax elements encoded and decoded based on a current index and a reference index to represent the current video block encoded and decoded using a palette mode codec tool, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1129] 73. A method according to solution 72, wherein the difference between the current index and the reference index is encoded and decoded.

[1130] 74. A method according to solution 73, wherein the codec representation of the difference excludes zero-valued differences.

[1131] 75. A method according to solution 72, wherein the modulus of the difference between the current index and the reference index is encoded.

[1132] 76. A method according to solution 75, wherein the modulus is encoded as I=modulo(CR,MaxPaletteIndex), where C is the current index, R is the reference index, and MaxPaletteIndex is a predefined non-negative integer.

[1133] 77. The method of solution 72, wherein the reference index is set to -1 at the beginning of a palette block of a palette mode codec.

[1134] 78. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to format rules for representing a current video block encoded using a palette mode codec using syntax elements including escape symbols that are predictively encoded, wherein the palette mode codec represents that the current video block uses a palette with representative color values, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color values.

[1135] 79. The method of solution 78, wherein the escape symbol is predictively encoded and decoded based on previously encoded and decoded escape symbols.

[1136] 80. A method according to solution 78, wherein escape symbols in a color component of the video are predictively encoded based on values ​​in the same color component.

[1137] 81. A method according to solution 78, wherein the escape symbol in the first color component of the video is predictively encoded based on the value in the second color component of the video that is different from the first color component.

[1138] 82. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of representing the current video block encoded and decoded using a palette mode codec tool using a syntax element for run-length encoding and decoding in a context based on a palette index for indexing a palette entry, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1139] 83. A method according to solution 82, wherein the context for the prefix of the length element is based on the palette index after an index adjustment process at the decoder.

[1140] 84. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of using a syntax element including a current palette index that is independent of a previous palette index signaling notification to represent the current video block encoded and decoded using a palette mode codec tool, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1141] 85. The method of solution 84, wherein using the previous palette index is based on whether the current video block includes one or more escape symbols, and wherein the escape symbols are used for samples of the current video block that are not encoded using the representative color value.

[1142] 86. A video processing method, comprising: determining a first neighboring video block for predicting a quantization parameter of a current video block of one or more video regions of a video based on an alignment rule and a second neighboring video block for predictively determining a coding mode of the current video block; and performing conversion between the video and a bitstream representation of the video based on the determination.

[1143] 87. The method of solution 86, wherein the first neighboring video block is a top-left neighboring video block or an above neighboring video block.

[1144] 88. The method of solution 86 or 87, wherein the second neighboring video block is a top-left neighboring video block or an above neighboring video block.

[1145] 89. The method of any of solutions 86 to 88, wherein the codec mode comprises a most probable mode (MPM) for the current video block.

[1146] 90. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of using syntax elements including block-level quantization parameter (QP) differences to represent a current video block encoded and decoded using a palette mode codec tool regardless of whether the current video block includes an escape symbol, wherein the palette mode codec tool represents that the current video block uses a palette with representative color values, and wherein the escape symbol is used for samples of the current video block that are not encoded and decoded using the representative color values.

[1147] 91. The method of solution 90, wherein the QP difference is encoded and decoded for palette blocks having a width greater than a threshold.

[1148] 92. The method of solution 90, wherein the QP difference is encoded and decoded for palette blocks having a height greater than a threshold.

[1149] 93. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of using syntax elements including one or more coding block flags (CBFs) for palette segment blocks to represent the current video block encoded and decoded using a palette mode codec tool, wherein the palette mode codec tool represents the current video block using a palette of representative color values.

[1150] 94. The method of solution 93, wherein each of the CBFs is set equal to one.

[1151] 95. The method of solution 93, wherein the value of the one or more CBFs is based on whether the current video block includes an escape symbol, wherein the escape symbol is used for samples of the current video block that are not encoded using the representative color value.

[1152] 96. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of using a syntax element including one or more palette indexes to represent the current video block encoded and decoded using a palette mode codec tool, wherein the number of the one or more palette indexes (NumPltIdx) is greater than or equal to K, wherein the palette mode codec tool represents the current video block using a palette of representative color values, and wherein K is a positive integer.

[1153] 97. The method of solution 96, wherein K is based on the current palette size (S), the escape flag (E), or the size of the current video block (BlkS).

[1154] 98. The method of solution 97, wherein K=S+E.

[1155] 99. A method according to solution 96, wherein K is equal to the maximum value of the palette index (MaxPaletteIndex) plus one.

[1156] 100. A method according to solution 96, wherein one of the syntax elements includes NumPltIdx-K.

[1157] 101. A method according to solution 100, wherein the binarization of the value of (NumPltIdx-K) is a truncated binary code.

[1158] 102. The method of solution 100, wherein the binarization of the value of (NumPltIdx-K) is a truncated unary code.

[1159] 103. The method of solution 101 or 102, wherein (BlkS-K) is a binarization input parameter, and wherein BlkS is the size of the current video block.

[1160] 104. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule of representing the current video block encoded and decoded using a palette mode codec tool using a syntax element based on a maximum size of a palette of the current block, a size of the current video block, use of a lossless mode, or a quantization parameter (QP), wherein the palette mode codec tool represents a palette of representative color values ​​used by the current video block.

[1161] 105. A method according to solution 104, wherein, when it is determined that lossless mode has been applied, QP is greater than a threshold, or transform skip has been applied, the size of the palette of the current block is inferred to be equal to the size of the current video block.

[1162] 106. A method according to any of solutions 1 to 105, wherein performing the conversion is further based on one or more of the following options: video content of the video; a message signaled in a decoder parameter set (DPS), a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), an adaptation parameter set (APS), a picture header, a slice header, a slice group header, a maximum codec unit (LCU), a codec unit (CU), an LCU row, an LCU group, a transform unit (TU), a prediction unit (PU) block or a video codec unit; an indication of a color format of the video; a codec tree structure; a temporal ID layer; or a profile, level or hierarchy.

[1163] 107. A video processing method, comprising: determining to use a block-based differential pulse codec modulation (BDPCM) mode to encode and decode the current video block and divide the current video block into multiple transform blocks or sub-blocks for conversion between a video including one or more video regions including a current video block and a bitstream representation of the video; and based on the determination, as part of performing the conversion, performing residual prediction at the block level and including one or more residuals into the bitstream representation at the sub-block or transform block level.

[1164] 108. A video processing method, comprising: performing conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, wherein the bitstream representation complies with format rules for encoding and decoding the current video block using a line-based coefficient group (CG) palette mode, wherein the line-based CG palette mode represents a palette of representative color values ​​used by multiple fragments of each codec unit (CU) of the current video block.

[1165] 109. A method according to solution 108, wherein the bitstream representation includes an indication of whether there are escape samples for each coefficient group, and wherein the escape samples are for samples of the current video block that are not encoded using the representative color value.

[1166] 110. The method of solution 108, wherein the bitstream representation includes an indication of the use of replicating upper indices that are not context-encoded.

[1167] 111. The method of solution 110, wherein the indication is bypassed for encoding and decoding.

[1168] 112. A method according to solution 108, wherein one or more copy flags, one or more run types, one or more indications of use of a copy above index, and escape values ​​are signaled in the bitstream representation in an interleaved manner.

[1169] 113. The method of solution 108, wherein the line-based CG palette mode is disabled upon determining that the size of the current video block is less than or equal to a threshold value (Th).

[1170] 114. A method according to any of solutions 107 to 113, wherein performing the conversion is further based on one or more of the following options: video content of the video; a message signaled in a decoder parameter set (DPS), sequence parameter set (SPS), video parameter set (VPS), picture parameter set (PPS), adaptation parameter set (APS), picture header, slice header, slice group header, maximum codec unit (LCU), codec unit (CU), LCU row, LCU group, transform unit (TU), prediction unit (PU) block or video codec unit; an indication of the color format of the video; a codec tree structure; a temporal ID layer; or a profile, level or hierarchy.

[1171] 115. A method according to any of solutions 1 to 114, wherein performing the conversion includes generating the bitstream representation from the one or more video regions.

[1172] 116. A method according to any of solutions 1 to 114, wherein performing the conversion includes generating the one or more video regions from the bitstream representation.

[1173] 117. An apparatus in a video system, comprising a processor and a non-transitory memory having instructions located thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method according to any of solutions 1 to 116.

[1174] 118. A computer program product stored on a non-transitory computer-readable medium, the computer program product comprising program code for implementing the method according to any of solutions 1 to 116.

[1175] The disclosed and other solutions, examples, embodiments, modules and functional operations described in this document can be implemented in digital electronic circuits or computer software, firmware or hardware, including the structures disclosed in this document and their structural equivalents, or a combination of one or more thereof. The disclosed embodiments and other embodiments can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer-readable medium, for execution by a data processing device or to control the operation of the data processing device. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a storage device, a material composition that affects a machine-readable propagation signal, or a combination of one or more thereof. The term "data processing device" covers all devices, equipment and machines for processing data, including (for example) a programmable processor, a computer or multiple processors or computers. In addition to hardware, the device may also include code that creates an execution environment for the computer program under consideration, for example, code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more thereof. A propagated signal is an artificially generated signal, for example, a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device.

[1176] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language (including compiled or interpreted languages) and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed to be executed on one or more computers that are located at one site or distributed across multiple sites and interconnected by a communications network.

[1177] The processes and logic flows described in this specification can be performed by executing one or more computer programs by one or more programmable processors to perform functions by operating on input data and generating output. These processes and logic flows can also be performed by special purpose logic circuits, and the apparatus can also be implemented as special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits).

[1178] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally speaking, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor that executes instructions and one or more storage devices that store instructions and data. Usually, a computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or be operatively coupled to receive data from or transfer data to one or more large-capacity storage devices, or both. However, a computer does not necessarily have such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including (for example) semiconductor storage devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD ROM and DVD ROM disks. The processor and memory can be supplemented by, or incorporated into, special-purpose logic circuits.

[1179] Although this patent document contains many details, it should not be interpreted as a limitation on any subject matter or claim scope, but rather as a description of specific features of specific embodiments of specific technologies. Certain features described in this patent document in the context of each individual embodiment may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination. In addition, although certain features may be described above as working in certain combinations and even initially claimed for protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may involve sub-combinations or variations of sub-combinations.

[1180] Similarly, although operations are shown in a particular order in the drawings, this should not be understood as requiring such operations to be performed in a sequential order or the particular times shown, or requiring all of the operations shown to be performed to achieve the desired results. In addition, the division of various system components among the embodiments described in this patent document should not be understood as requiring such division in all embodiments.

[1181] Only a few implementations and examples are described, and other implementations, enhancements, and variations can be made based on what is described and illustrated in this patent document.

Claims

1. A video data processing method, comprising: For the conversion between a current video block of a video and a bitstream of the video, determining to apply a prediction mode to the current video block, wherein in the prediction mode, reconstructed samples are represented by a set of representative color values, and the set of representative color values includes at least one of the following: 1) a palette predictor, 2) an escape sample, or 3) palette information included in the bitstream; And Performing the conversion based at least on the prediction mode, wherein a first syntax element specifying a quantization value of the escape sample is included in the bitstream, and wherein binaryization of the first syntax element uses K-th order exponential Golomb (EG) coding, and K is a non-negative integer not equal to three, wherein the escape sample is reconstructed based on a clipping function and the quantization value of the escape sample, wherein the reconstructed escape sample is determined based on Clip3(0, (1<<BitDepth)-1, tmpVal), wherein tmpVal is determined based on ((m<<(qP / 6))+32)>>6, wherein qP specifies a quantization parameter, wherein m is determined based on the quantization value of the escape sample, wherein the qP is determined based on Max(QpPrimeTsMin, Qp'Y), wherein QpPrimeTsMin represents the minimum allowable quantization parameter for the transform skip mode, wherein Qp'Y represents the luminance quantization parameter, wherein QpPrimeTsMin is defined as 6*n+4, and n is the value of a second syntax element included in the bitstream, and the second syntax element is used to determine the minimum allowable quantization parameter for the transform skip mode.

2. The method according to claim 1, wherein: K=5。 3. The method according to claim 1, wherein: The second syntax element is included in the sequence level of the bitstream.

4. The method according to claim 1, wherein: The conversion includes encoding the current video block into the bitstream.

5. The method according to claim 1, wherein: The conversion includes decoding the current video block from the bitstream.

6. A device for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For the conversion between a current video block of a video and a bitstream of the video, determining to apply a prediction mode to the current video block, wherein in the prediction mode, reconstructed samples are represented by a set of representative color values, and the set of representative color values includes at least one of the following: 1) a palette predictor, 2) an escape sample, or 3) palette information included in the bitstream; and Performing the conversion based at least on the prediction mode, in, a first syntax element specifying a quantization value of the escape sample is included in the bitstream, and wherein binaryization of the first syntax element uses K-th order exponential Golomb (EG) coding, and K is a non-negative integer not equal to three, wherein the escape sample is reconstructed based on a clipping function and the quantization value of the escape sample, Among them, the reconstructed escape sample points are determined based on Clip3(0, (1<<BitDepth)-1, tmpVal), where tmpVal is determined based on ((m<<(qP / 6))+32)>>6, where qP specifies the quantization parameter, where m is determined based on the quantization value of the escape sample points, where the qP is determined based on Max(QpPrimeTsMin, Qp'Y), where QpPrimeTsMin represents the minimum allowable quantization parameter for the transform skip mode, where Qp'Y represents the luminance quantization parameter, where QpPrimeTsMin is defined as 6*n+4, where n is the value of a second syntax element included in the bitstream, and the second syntax element is used to determine the minimum allowable quantization parameter for the transform skip mode.

7. The apparatus according to claim 6, wherein K = 5.

8. The device according to claim 6, wherein: The second syntax element is included in the sequence level of the bitstream.

9. A non-transitory computer-readable storage medium storing instructions that cause a processor to: For the conversion between the current video block of a video and the bitstream of the video, determine to apply a prediction mode to the current video block, wherein in the prediction mode, the reconstructed sample points are represented by a set of representative color values, and the set of representative color values includes at least one of the following: 1) a palette predictor, 2) escape sample points, or 3) palette information included in the bitstream; and Perform the conversion based at least on the prediction mode, in, A first syntax element specifying the quantization value of the escape sample points is included in the bitstream, and the binarization of the first syntax element uses K-order exponential Golomb (EG) coding, where K is a non-negative integer not equal to three, Among them, the escape sample points are reconstructed based on a clipping function and the quantization value of the escape sample points, Among them, the reconstructed escape sample points are determined based on Clip3(0, (1<<BitDepth)-1, tmpVal), where tmpVal is determined based on ((m<<(qP / 6))+32)>>6, where qP specifies the quantization parameter, where m is determined based on the quantization value of the escape sample points, where the qP is determined based on Max(QpPrimeTsMin, Qp'Y), where QpPrimeTsMin represents the minimum allowable quantization parameter for the transform skip mode, where Qp'Y represents the luminance quantization parameter, where QpPrimeTsMin is defined as 6*n+4, where n is the value of a second syntax element included in the bitstream, and the second syntax element is used to determine the minimum allowable quantization parameter for the transform skip mode.

10. The non-transitory computer-readable storage medium of claim 9, wherein: K=5。 11. A non-transitory computer-readable recording medium storing a bitstream generated by a method executed by a video processing apparatus, wherein the method includes: For a current video block of a video, determine to apply a prediction mode to the current video block, wherein in the prediction mode, reconstructed samples are represented by a set of representative color values, and the set of representative color values includes at least one of the following: 1) a palette predictor, 2) an escape sample, or 3) palette information included in the bitstream; And Generate the bitstream based at least on the prediction mode, wherein a first syntax element specifying a quantization value of the escape sample is included in the bitstream, and wherein binarization of the first syntax element uses K - order Exponential Golomb (EG) coding, where K is a non - negative integer not equal to three, wherein the escape sample is reconstructed based on a clamping function and the quantization value of the escape sample, wherein the reconstructed escape sample is determined based on Clip3(0, (1 << BitDepth)-1, tmpVal), where tmpVal is determined based on ((m << (qP / 6)) + 32) >> 6, where qP specifies a quantization parameter, where m is determined based on the quantization value of the escape sample, where the qP is determined based on Max(QpPrimeTsMin, Qp'Y), where QpPrimeTsMin represents the minimum allowable quantization parameter for the transform skip mode, where Qp'Y represents the luminance quantization parameter, where QpPrimeTsMin is defined as 6 * n + 4, where n is the value of a second syntax element included in the bitstream, and the second syntax element is used to determine the minimum allowable quantization parameter for the transform skip mode.

12. A method for storing a bitstream of a video, comprising: For a current video block of a video, determine to apply a prediction mode to the current video block, wherein in the prediction mode, reconstructed samples are represented by a set of representative color values, and the set of representative color values includes at least one of the following: 1) a palette predictor, 2) an escape sample, or 3) palette information included in the bitstream; Generate the bitstream based at least on the prediction mode; And Store the bitstream in a non - transitory computer - readable recording medium, wherein a first syntax element specifying a quantization value of the escape sample is included in the bitstream, and wherein binarization of the first syntax element uses K - order Exponential Golomb (EG) coding, where K is a non - negative integer not equal to three, wherein the escape sample is reconstructed based on a clamping function and the quantization value of the escape sample, Among them, the reconstructed escape sample points are determined based on Clip3(0, (1 << BitDepth) - 1, tmpVal), where tmpVal is determined based on ((m << (qP / 6)) + 32) >> 6, where qP specifies the quantization parameter, where m is determined based on the quantization value of the escape sample points, where the qP is determined based on Max(QpPrimeTsMin, Qp'Y), where QpPrimeTsMin represents the minimum allowable quantization parameter for the transform skip mode, where Qp'Y represents the luminance quantization parameter, where QpPrimeTsMin is defined as 6 * n + 4, where n is the value of a second syntax element included in the bitstream, and the second syntax element is used to determine the minimum allowable quantization parameter for the transform skip mode.

13. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code that, when executed by a processor, implements the method according to any one of claims 1 - 5.

Citation Information

Patent Citations

  • Methods for palette size signaling and conditional palette escape flag signaling

    CN106416257A

  • Robust encoding / decoding of escape-coded pixels in palette mode

    CN106664405A