Entropy coding for palette escape symbols
Entropy coding techniques for palette escape symbols in video coding standards enhance encoding and decoding efficiency, addressing bandwidth and quality challenges by optimizing the representation and processing of palette escape symbols.
Patent Information
- Application Number
- JP2025179387
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-01-09
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-03
AI Technical Summary
Existing video coding standards face challenges in efficiently encoding and decoding palette escape symbols, which affect the bandwidth and quality of digital video transmission.
Implementing entropy coding techniques for palette escape symbols using Exponential-Golomb codes, fixed-length binarization, variable length coding, quantization, and binary shift operations within the palette mode coding tool to enhance the encoding and decoding process.
Improves the efficiency and quality of digital video encoding and decoding by optimizing the representation and processing of palette escape symbols, reducing bandwidth demands and enhancing video quality.
Smart Images

Figure 2026016570000001_ABST
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application is a divisional application of Japanese Patent Application No. 2023-206688, which is a divisional application of Japanese Patent Application No. 2022-509093, which is based on International Patent Application No. PCT / US2020 / 046581 filed on August 15, 2020, which is based on International Patent Application No. PCT / CN2019 / 100850 filed on August 15, 2019, PCT / CN2019 / 106700 filed on September 29, 2019, and PCT / CN2019 / 106700 filed on September 29, 2019. This application claims priority to and the benefit of PCT Application Nos. PCT / CN2019 / 107494, filed on September 24, 2019, PCT / CN2019 / 108736, filed on September 27, 2019, PCT / CN2019 / 109793, filed on October 1, 2019, PCT / CN2019 / 113931, filed on October 29, 2019, and PCT / CN2020 / 071221, filed on January 9, 2020. All of the aforementioned patent applications are hereby incorporated by reference into this application.
[0002] Technical Field This paper concerns video and image coding and decoding technologies. [Background technology]
[0003] Digital video accounts for the largest bandwidth usage on the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demands for digital video usage are expected to continue to increase. Summary of the Invention [Means for solving the problem]
[0004] The disclosed techniques may be used by embodiments of a video or image decoder or encoder to perform entropy coding of palette escape symbols in palette mode coding and decoding.
[0005] In one example aspect, a method of video processing is disclosed that 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, the bitstream representation conforming to format rules where the current video block is coded using a palette mode coding tool, where binarization of escape symbols for the current video block uses Exponential-Golomb (EG) codes of order K, where K is a non-negative integer not equal to 3, where the palette mode coding tool represents the current video block using a palette of representative color values, and where the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0006] In another exemplary aspect, a method of video processing is disclosed that includes performing a 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 where a current video block of the one or more video blocks is coded using a palette mode coding tool and a binarization of escape symbols for the current video block uses a fixed-length binarization, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without the representative color values.
[0007] In yet another example, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules where the current video block is coded using a palette mode coding tool, binarizing escape symbols of the current video block using variable length coding, the palette mode coding tool representing the current video block using a palette of representative color values, and the escape symbols being used for samples of the current video block that are coded without using the representative color values.
[0008] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video that includes one or more video regions that include a current video block and a bitstream representation of the video, the conversion including application of a quantization or inverse quantization process to the current video block, the bitstream representation conforming to format rules that configure application of the quantization or inverse quantization process based on whether the current video block is coded using a palette mode coding tool, the palette mode coding tool representing the current video block using a palette of representative color values.
[0009] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule whereby a current video block coded using a palette mode coding tool is represented such that escape symbols of the current video block are quantized and / or dequantized using binary shift operations, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0010] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules where the current video block is coded using a palette mode coding tool, one or more palette indices of the palette mode coding tool being coded without reference indices, the palette mode coding tool representing the current video block using a palette of representative color values.
[0011] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules that constrain derivations between indices of escape symbols and indices of non-escaped symbols, the palette mode coding tool representing the current video block using a palette of representative color values, and the escape symbols being used for samples of the current video block that are coded without using the representative color values.
[0012] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video that includes one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules where the current video block is coded using a palette mode coding tool, a derived palette index of the palette mode coding tool having a maximum value, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0013] In yet another exemplary aspect, a method of video processing is disclosed that 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, the bitstream representation conforming to a format rule where a current video block to be coded using a palette mode coding tool is represented using syntax elements including escape symbols, values of indexes indicating the escape symbols are unchanged for each of the one or more video regions, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without the representative color values.
[0014] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video that includes one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to a format rule whereby a current video block coded using a palette mode coding tool is represented using syntax elements that are coded based on a current index and a reference index, the palette mode coding tool representing the current video block using a palette of representative color values.
[0015] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to formatting rules whereby a current video block coded using a palette mode coding tool is represented using syntax elements that include predictively coded escape symbols, the palette mode coding tool representing the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0016] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video that includes one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to a format rule where the current video block coded using a palette mode coding tool is represented using syntax elements that are run-length coded in a context based on a palette index for indexing palette items, the palette mode coding tool representing the current video block using a palette of representative color values.
[0017] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element that includes a current palette index that is signaled independently of previous palette indexes, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0018] In yet another example aspect, a method of video processing is disclosed that includes determining, based on an ordering rule, a first neighboring video block to be used to predict a quantization parameter for a current video block of one or more video regions of a video and a second neighboring video block to be used to predictively determine a coding mode for the current video block, and performing, based on the determination, a conversion between the video and a bitstream representation of the video.
[0019] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element that includes a block-level quantization parameter (QP) difference regardless of whether the current video block includes an escape symbol, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbol is used for samples of the current video block that are coded without using the representative color values.
[0020] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video that includes one or more video regions that include a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element that includes one or more coding block flags (CBFs) for the palette block, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0021] In yet another exemplary aspect, a method of video processing is disclosed, the method including performing a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, the bitstream representation conforming to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element including one or more palette indices, a number of the one or more palette indices (NumPltIdx) being greater than or equal to K, the palette mode coding tool representing the current video block using a palette of representative color values, and K being a positive integer.
[0022] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video that includes one or more video regions that include a current video block and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule where a current video block to be coded using a palette mode coding tool is represented using syntax elements that are based on a maximum size of a palette for the current block, a size of the current video block, use of a lossless mode, or a quantization parameter (QP), and the palette mode coding tool represents the current video block using a palette of representative color values.
[0023] In yet another example, a method of video processing is disclosed that includes, for conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, determining that the current video block is coded in a block-based differential pulse code modulation (BDPCM) mode and partitioned into a plurality of transform blocks or sub-blocks, and, as part of performing the conversion, performing residual prediction at a block level and including one or more residuals in the bitstream representation at a sub-block or transform block level based on the determination.
[0024] In yet another exemplary aspect, a method of video processing is disclosed that includes performing a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules where the current video block is coded using a line-based coefficient group (CG) palette mode, the line-based CG palette mode using a palette of representative color values to represent multiple segments of each coding unit (CU) of the current video block.
[0025] In yet another exemplary aspect, the above-described method may be implemented by a video encoder device comprising a processor.
[0026] In yet another exemplary aspect, the above-described method may be implemented by a video decoder device comprising a processor.
[0027] In yet another exemplary aspect, the methods may be embodied in processor-executable instructions and stored on a computer-readable program medium.
[0028] These and other aspects are further described herein. [Brief explanation of the drawings]
[0029] [Figure 1] FIG. 10 is a diagram showing an example of a block coded in palette mode.
[0030] [Figure 2] 13 illustrates an example of using a palette predictor to signal palette items.
[0031] [Figure 3] 1 shows examples of horizontal and vertical transverse scans.
[0032] [Figure 4] 1 shows an exemplary coding of palette indices.
[0033] [Figure 5] A and B show an example of a minimal chroma intra prediction unit (SCIPU).
[0034] [Figure 6] FIG. 1 shows a block diagram of an example of in-loop filtering in video processing.
[0035] [Figure 7] An example of iterated palette items in the case of a local dual tree is shown below.
[0036] [Figure 8] 1 shows an example of the left and top blocks in the process of context derivation.
[0037] [Figure 9] FIG. 1 is a block diagram of an example hardware platform that may be used to implement the techniques described in this paper.
[0038] [Figure 10] FIG. 1 is a block diagram of an example video processing system in which the disclosed techniques may be implemented.
[0039] [Figure 11] 1 is a block diagram illustrating a video coding system according to some embodiments of the present disclosure.
[0040] [Figure 12] FIG. 2 is a block diagram illustrating an encoder according to some embodiments of the present disclosure.
[0041] [Figure 13] FIG. 2 is a block diagram illustrating a decoder according to some embodiments of the present disclosure.
[0042] [Figure 14] 1 shows a flowchart of an exemplary method of video processing. [Figure 15] 1 shows a flowchart of an exemplary method of video processing. [Figure 16] 1 shows a flowchart of an exemplary method of video processing. [Figure 17] 1 shows a flowchart of an exemplary method of video processing. [Figure 18] 1 shows a flowchart of an exemplary method of video processing. [Figure 19] 1 shows a flowchart of an exemplary method of video processing. [Figure 20] 1 shows a flowchart of an exemplary method of video processing. [Figure 21] 1 shows a flowchart of an exemplary method of video processing. [Figure 22] 1 shows a flowchart of an exemplary method of video processing. [Figure 23] 1 shows a flowchart of an exemplary method of video processing. [Figure 24] 1 shows a flowchart of an exemplary method of video processing. [Figure 25] 1 shows a flowchart of an exemplary method of video processing. [Figure 26] 1 shows a flowchart of an exemplary method of video processing. [Figure 27] 1 shows a flowchart of an exemplary method of video processing. [Figure 28] 1 shows a flowchart of an exemplary method of video processing. [Figure 29] 1 shows a flowchart of an exemplary method of video processing. [Figure 30] 1 shows a flowchart of an exemplary method of video processing. [Figure 31] 1 shows a flowchart of an exemplary method of video processing. [Figure 32] 1 shows a flowchart of an exemplary method of video processing. [Figure 33] 1 shows a flowchart of an exemplary method of video processing. DETAILED DESCRIPTION OF THE INVENTION
[0043] This document provides various techniques that can be used by decoders of images or video bitstreams to improve the quality of decompressed or decoded digital video or images. For brevity, the term "video" is used herein to include both sequences of pictures (traditionally called videos) and individual images. Furthermore, video encoders may also implement these techniques during the encoding process to reconstruct decoded frames that are used for further encoding.
[0044] Section headings are used herein for ease of understanding and do not limit the embodiments and techniques to the corresponding section, so that embodiments from one section can be combined with embodiments from other sections.
[0045] 1. Overview This paper relates to video coding techniques, specifically index and escape symbol coding in palette coding. It may be applied to existing video coding standards such as HEVC or to a yet-to-be-finalized standard (Versatile Video Coding). It may also be applicable to future video coding standards or video codecs.
[0046] 2. Background Video coding standards have evolved primarily through the development of well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, while ISO / IEC produced MPEG-1 and MPEG-4 Visual. Together, the two organizations produced the H.262 / MPEG-2 Video, H.264 / MPEG-4 Advanced Video Coding (AVC), and H.265 / HEVC standards. Since H.262, video coding standards have been based on hybrid video coding architectures that utilize temporal prediction and transform coding. To explore future video coding technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, many new methods have been adopted by the JVET and incorporated into reference software named the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Team (JVET) between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was established to work on the VVC standard, which aims to achieve a 50% bitrate reduction compared to HEVC.
[0047] The latest version of the VVC draft, i.e., Versatile Video Coding (Draft 6), can be found at: http: / / phenix.it-sudparis.eu / jvet / doc_end_user / documents / 15_Gothenburg / wg11 / JVET-O2001-v14.zip
[0048] The latest reference software (VTM) for VVC can be found at: https: / / vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM / tags / VTM-5.0
[0049] 2.1 Palette Mode in HEVC Screen Content Coding Extension (HEVC-SCC) 2.1.1 Palette Mode Concept
[0050] The basic idea behind palette mode is that pixels in a CU are represented by a small set of representative color values. This set is called the palette. It is also possible to indicate samples that are outside the palette by signaling an escape symbol followed by a (possibly quantized) component value. This kind of pixel is called an escape pixel. Palette mode is illustrated in Figure 1. As shown in Figure 1, for each pixel with three color components (luma and two chroma components), an index into the palette is established, and the block can be reconstructed based on the established values in the palette.
[0051] 2.1.2 Coding Palette Items For coding of palette entries, a palette predictor is maintained. The maximum size of the palette and the palette predictor are signaled in the SPS. In HEVC-SCC, palette_predictor_initializer_present_flag is introduced in the PPS. If this flag is 1, an item 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 tile. Depending on the value of palette_predictor_initializer_present_flag, the palette predictor is either reset to 0 or initialized using the palette predictor initializer entries signaled in the PPS. In HEVC-SCC, a palette predictor initializer of size 0 allows explicit disabling of palette predictor initialization at the PPS level.
[0052] For each item in the palette predictor, a reuse flag is signaled to indicate whether it is part of the current palette. This is shown in Figure 2. The reuse flag is transmitted using run-length coding of zeros. Then, the number of the new palette item is signaled using an Exponential Golomb (EG) code of degree 0, i.e., EG-0. Finally, the component value for the new palette item is signaled.
[0053] 2.1.3 Palette Index Coding Palette indices are coded using horizontal and vertical transverse scans as shown in Figure 3. The scan order is explicitly signaled in the bitstream using palette_transpose_flag. For the remainder of the subsection, the scan is assumed to be horizontal.
[0054] Palette indices are coded using two palette sample modes: 'COPY_LEFT' and 'COPY_ABOVE'. In 'COPY_LEFT' mode, the palette index is assigned to the decoded 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 coded in the same mode.
[0055] In palette mode, the value of the index for an escape symbol is the number of palette items. Also, if the escape symbol is part of a run in 'COPY_LEFT' or 'COPY_ABOVE' modes, an escape component value is signaled for each escape symbol. The coding of the palette index is shown in Figure 4.
[0056] This syntax order is achieved as follows: First, the number of index values for the CU is signaled. Following this, the actual index value for the entire CU is signaled using truncated binary coding. Both the number of indices and the index value are coded in bypass mode, which groups the bypass bins associated with the index. Then, the palette sample mode (if required) and runs are signaled in an interleaved manner. Finally, the component escape values for the escape symbols for the entire CU are grouped together and coded in bypass mode. The binarization of the escape symbols is third-order EG coding, i.e., EG-3.
[0057] An additional syntax element, last_run_type_flag, is signaled after signaling the index value, which eliminates the need to signal the run value corresponding to the last run in the block along with the number of the index.
[0058] In HEVC-SCC, palette mode is also enabled for 4:2:2, 4:2:0, and monochrome chroma formats. The signaling of palette items and palette indices is nearly identical for all chroma formats. For non-monochrome formats, each palette item consists of three components. For monochrome formats, each palette item consists of a single component. For subsampled chroma directions, chroma samples are associated with luma sample indices that are divisible by two. After reconstructing the palette index for a CU, if a sample only has a single component associated with it, only the first component of the palette item is used. The only difference in signaling is for escape component values. For each escape symbol, the number of escape component values signaled can vary depending on the number of components associated with that symbol.
[0059] Furthermore, palette index coding has an index adjustment process. When signaling a palette index, the left neighbor index or the upper neighbor index should be different from the current index. Therefore, by eliminating one possibility, the range of the current palette index can be reduced by 1. After that, the index is signaled in truncated binary (TB) binarization.
[0060] The text associated with this section is shown as follows: where CurrPaletteIndex is the current palette index and adjustedRefPaletteIndex is the predicted index.
[0061] The variables PaletteIndexMap[xC][yC] specify the palette index. This is the CurrentPaletteEntries The array indices xC, yC specify the sample location (xC, yC) relative to the top-left luma sample of the picture. The value of PaletteIndexMap[xC][yC] ranges from 0 to MaxPaletteIndex (inclusive). The variable adjustedRefPaletteIndex is derived as follows: adjustedRefPaletteIndex=MaxPaletteIndex+1 if(PaletteScanPos>0){ xcPrev=x0+TraverseScanOrder[log2CbWidth][log2bHeight][PaletteScanPos-1][0] ycPrev=y0+TraverseScanOrder[log2CbWidth][log2bHeight][PaletteScanPos-1][1] if(CopyAboveIndicesFlag[xcPrev][ycPrev]==0){ adjustedRefPaletteIndex=PaletteIndexMap[xcPrev][ycPrev]{ (7-157) else { if(!palette_transpose_flag) adjustedRefPaletteIndex=PaletteIndexMap[xC][yC-1] else adjustedRefPaletteIndex=PaletteIndexMap[xC-1][yC] } }
[0062] If CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows: if(CurrPaletteIndex>=adjustedRefPaletteIndex) CurrPaletteIndex++
[0063] Furthermore, run-length elements in palette mode are context coded. The relevant context derivation process described in JVET-O2011-vE is shown below: Derivation process of ctxInc for the syntax element palette_run_prefix The input to this process is the bin index binIdx and the syntax elements copy_above_palette_indices_flag and palette_idx_idc. The output of this process is the variable ctxInc. The variable ctxInc is derived as follows: If copy_above_palette_indices_flag is equal to 0 and binIdx is equal to 0, ctxInc is derived as follows: ctxInc=(palette_idx_idc<1)? 0:((palette_idx_idc<3)?1:2) (9-69) Otherwise, ctxInc is given by Table 1: [Table 1]
[0064] 2.2 Palette Mode in VVC 2.2.1 Palettes in Dual Trees In VVC, a dual-tree coding structure is used for coding intra-slice, so the luma component and two chroma components may have different palettes and palette indices, and the two chroma components share the same palette and palette indices.
[0065] 2.2.2 Palettes as Separate Modes In JVET-N0258 and current VTM, the prediction modes for a coding unit can be MODE_INTRA, MODE_INTER, MODE_IBC, MODE_PLT. The binarization of prediction modes is changed accordingly.
[0066] When IBC is turned off, on an I-tile, the first bin is used to indicate whether the current prediction mode is MODE_PLT. On a P / B-tile, the first bin is used to indicate whether the current prediction mode is MODE_INTRA. Otherwise, one additional bin is used to indicate whether the current prediction mode is MODE_PLT or MODE_INTER. When IBC is turned on, on an I-tile, the first bin is used to indicate whether the current prediction mode is MODE_IBC. If not, the second bin is used to indicate whether the current prediction mode is MODE_PLT or MODE_INTRA. On a P / B-tile, the first bin is used to indicate whether the current prediction mode is MODE_INTRA. If it is an intra mode, the second bin is used to indicate whether the current prediction mode is MODE_PLT or MODE_INTRA. If not, the second bin is used to indicate whether the current prediction mode is MODE_IBC or MODE_INTER.
[0067] The relevant text in JVET-O2001-vE is shown below.
[0068] Coding Unit Syntax [Table 2]
[0069] 2.2.3 Palette Mode Syntax [Table 3] TIFF2026016570000005.tif204170 TIFF2026016570000006.tif209170 TIFF2026016570000007.tif200170 TIFF2026016570000008.tif87170
[0070] 2.2.4 Palette Mode Semantics In the following semantics, the array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. The array indices xC, yC specify the sample position (xC, yC) relative to the top-left luma sample of the picture. The 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, and startComp equal to 2 indicates the Cr component. numComps specifies the number of color components in the current palette table.
[0071] The predictor palette consists of palette items from the previous coding unit that are used to predict items in the current palette. 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 Section 8.4.5.3. Variable PalettePredictorEntryReuseFlags[i] equal to 1 specifies that the i-th item in the predictor palette is reused in the current palette. PalettePredictorEntryReuseFlags[i] equal to 0 specifies that the i-th item in the predictor palette is not an item in the current palette. All elements of the array PalettePredictorEntryReuseFlags[i] are initialized to 0.
[0072] palette_predictor_run is used to determine the number of zeros that precede a non-zero entry in the array PalettePredictorEntryReuseFlags. It is a bitstream conformance requirement that the value of palette_predictor_run be in the range 0 to (PredictorPaletteSize-predictorEntryIdx), inclusive, where predictorEntryIdx corresponds to the current position in the array PalettePredictorEntryReuseFlags. The variable NumPredictedPaletteEntries specifies the number of entries in the current palette that are reused from the predictor palette. The value of NumPredictedPalletteEntries is in the range 0 to palette_max_size, inclusive.
[0073] 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. If num_signalled_palette_entries is not present, it is inferred to be equal to 0. 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: CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries (7-155) The value of CurrentPaletteSize[startComp] is in the range from 0 to palette_max_size, inclusive.
[0074] new_palette_entries[cIdx][i] specifies the value for the i-th signaled palette entry for color component cIdx. The variable PredictorPaletteEntries[cIdx][i] specifies the i-th element in the predictor palette for color component cIdx. The variable CurrentPaletteEntries[cIdx][i] specifies the i-th element in the current palette for color component cIdx and is derived as follows: [Table 4]
[0075] palette_escape_val_present_flag equal to 1 specifies that the current coding unit contains at least one escape-coded sample. escape_val_present_flag equal to 0 specifies that there are no escape-coded samples in the current coding unit. If not present, the value of palette_escape_val_present_flag is inferred to be equal to 1. The variable MaxPaletteIndex specifies the maximum possible palette index for the current coding unit. The value of MaxPaletteIndex is CurrentPaletteSize[startComp]-1+palette_escape_val_presen_flag is set equal to
[0076] num_palette_indices_minus1 plus 1 is the number of palette indices explicitly signaled or inferred for the current block. If num_palette_indices_minus1 is not present, it is inferred to be equal to 0. palette_idx_idc is an index into the palette table, CurrentPaletteEntries. The value of palette_idx_idc is in the range 0 to MaxPaletteIndex (inclusive) for the first index in the block, and in the range 0 to (MaxPaletteIndex-1) (inclusive) for the remaining indices in the block. If palette_idx_idc is not present, it is inferred to be equal to 0. The variable PaletteIndexIdc[i] stores the i-th palette_idx_idc that is either explicitly signaled or inferred. All elements of the array PaletteIndexIdc[i] are initialized to 0.
[0077] copy_above_indices_for_final_run_flag equal to 1 specifies that the palette indices for the last positions of a coding unit are copied from the palette indices in the row above if a horizontal cross scan is used, or from the palette indices in the column to the left if a vertical cross scan is used. copy_above_indices_for_final_run_flag equal to 0 specifies that the palette indices for the last positions in the coding unit are copied from PaletteIndexIdc[num_palette_indices_minus1]. If copy_above_indices_for_final_run_flag is not present, it is inferred to be equal to 0.
[0078] palette_transpose_flag equal to 1 specifies that a vertical traverse is applied to traverse the indices for samples within the current coding unit. palette_transpose_flag equal to 0 specifies that a horizontal traverse is applied to traverse the indices for samples within the current coding unit. If not present, the value of palette_transpose_flag is inferred to be equal to 0. The array TraverseScanOrder specifies the scan order array for palette coding. If palette_transpose_flag is equal to 0, TraverseScanOrder is assigned the horizontal scan order HorTravScanOrder, and if palette_transpose_flag is equal to 1, TraverseScanOrder is assigned the vertical scan order VerTravScanOrder.
[0079] 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 cross scanning is used, or the same position in the left column if vertical cross scanning is used. copy_above_palette_indices_flag equal to 0 specifies that an indication of the palette index of the sample is coded or inferred in the bitstream.
[0080] The variable CopyAboveIndicesFlag[xC][yC] equal to 1 specifies that the palette indices are copied from the palette indices in the row above (horizontal scan) or column to the left (vertical scan). CopyAboveIndicesFlag[xC][yC] equal to 0 specifies that the palette indices are either explicitly coded in the bitstream or inferred. The array indices xC, yC specify the sample location (xC, yC) relative to the top-left luma sample of the picture. The value of PaletteIndexMap[xC][yC] must be in the range 0 to (MaxPaletteIndex-1), inclusive.
[0081] The variables PaletteIndexMap[xC][yC] specify a palette index, which is an index into the array represented by CurrentPaletteEntries. The array indices xC, yC specify the sample's location (xC, yC) relative to the top-left luma sample of the picture. The value of PaletteIndexMap[xC][yC] is in the range from 0 to MaxPaletteIndex (inclusive).
[0082] The variable adjustedRefPaletteIndex is derived as follows: [Table 5] If CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows: if(CurrPaletteIndex>=adjustedRefPaletteIndex) CurrPaletteIndex++ (7-158)
[0083] palette_run_prefix, if present, specifies the prefix part for the binarization of PaletteRunMinus1.
[0084] palette_run_suffix is used in the derivation of the variable PaletteRunMinus1. If not present, the value of palette_run_suffix is inferred to be equal to 0.
[0085] If RunToEnd is equal to 0, the variable PaletteRunMinus1 is derived as follows: If PaletteMaxRunMinus1 is equal to 0, PaletteRunMinus1 is set equal to 0. Otherwise (PaletteMaxRunMinus1 is greater than 0), the following applies: If palette_run_prefix is less than 2, the following applies: PaletteRunMinus1=palette_run_prefix (7-159) Otherwise (palette_run_prefix is 2 or greater), the following applies: PrefixOffset=1<<(palette_run_prefix-1) PaletteRunMinus1=PrefixOffset+palette_run_suffix (7-160)
[0086] The variable PaletteRunMinus1 is used as follows: If CopyAboveIndicesFlag[xC][yC] is equal to 0, PaletteRunMinus1 specifies the number of consecutive locations with the same palette index minus 1. Otherwise, if palette_transpose_flag is equal to 0, PaletteRunMinus1 specifies the number of consecutive positions with the same palette index as used at the corresponding position in the row above, minus 1. Otherwise, PaletteRunMinus1 specifies the number of consecutive positions with the same palette index as used by the corresponding position in the left column, minus one. If RunToEnd is equal to 0, the variable PaletteMaxRunMinus1 represents the maximum possible value for PaletteRunMinus1, and it is a bitstream conformance requirement that the value of PaletteMaxRunMinus1 be greater than or equal to 0.
[0087] palette_escape_val specifies the quantized escape-coded sample value for a component. The variable PaletteEscapeVal[cIdx][xC][yC] specifies the escape value for samples for which PaletteIndexMap[xC][yC] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1. The array index cIdx specifies the color component. The array indices xC, yC specify the location (xC, yC) of the sample relative to the luma sample in the top-left corner of the picture. It is a bitstream conformance requirement that PaletteEscapeVal[cIdx][xC][yC] be in the range 0 to (1<<(BitDepthY+1)-1) inclusive for cIdx equal to 0, and in the range 0 to (1<<((BitDepthC+1))-1) inclusive for cIdx not equal to 0.
[0088] 1.1.1 Line-based CG palette mode A line-based CG palette mode is adopted for VVC. In this method, each CU in the palette mode is divided into multiple sample segments (in this study) based on the cross-scan mode. The encoding order for palette run coding in each segment is as follows: For each pixel, one context-coded bin run_copy_flag=0 is signaled to indicate whether the pixel is in the same mode as the previous pixel, i.e., whether the previous scanned pixel and the current pixel are both run type COPY_ABOVE, or whether the previous scanned pixel and the current pixel are both run type INDEX and have the same index value. Otherwise, run_copy_flag=1 is signaled. If the pixel and the previous pixel are in different modes, one context-coded bin copy_above_palette_indices_flag is signaled to indicate the run type of the pixel, i.e., INDEX or COPY_ABOVE. As with palette mode in VTM 6.0, if the sample is in the first row (horizontal cross scan) or first column (vertical cross scan), the decoder does not need to parse the run type, because INDEX mode is used by default. Also, if the previously parsed run type was COPY_ABOVE, the decoder does not need to parse the run type. After palette run coding of pixels in a segment, the index values (for INDEX mode) and quantized escape colors are bypass coded and grouped separately from the encoding / parsing of context-coded bins to improve throughput within each line CG. Because index values are now coded / parsed after run coding, rather than processed before palette run coding as in VTM, the encoder does not need to signal the number of index values, num_palette_indices_minus1, and the final run type, copy_above_indices_for_final_run_flag. The text for the line-based CG palette mode in JVET-P0077 is shown below.
[0089] Palette Coding Syntax [Table 6] TIFF2026016570000012.tif204170 TIFF2026016570000013.tif209170 TIFF2026016570000014.tif209170 TIFF2026016570000015.tif71170
[0090] 7.4.9.6 Palette Coding Semantics In the following semantics, the array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. The array indices xC, yC specify the sample position (xC, yC) relative to the top-left luma sample of the picture. The 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, and startComp equal to 2 indicates the Cr component. numComps specifies the number of color components in the current palette table. The predictor palette consists of palette items from the previous coding unit that are used to predict items in the current palette. 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 Section 8.4.5.3. Variable PalettePredictorEntryReuseFlags[i] equal to 1 specifies that the i-th item in the predictor palette is reused in the current palette. PalettePredictorEntryReuseFlags[i] equal to 0 specifies that the i-th item in the predictor palette is not an item in the current palette. All elements of the array PalettePredictorEntryReuseFlags[i] are initialized to 0.
[0091] palette_predictor_run is used to determine the number of zeros that precede a non-zero entry in the array PalettePredictorEntryReuseFlags. It is a bitstream conformance requirement that the value of palette_predictor_run be in the range 0 to (PredictorPaletteSize-predictorEntryIdx), inclusive, where predictorEntryIdx corresponds to the current position in the array PalettePredictorEntryReuseFlags. The variable NumPredictedPaletteEntries specifies the number of entries in the current palette that are reused from the predictor palette. The value of NumPredictedPalletteEntries is in the range 0 to palette_max_size, inclusive.
[0092] 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. If num_signalled_palette_entries is not present, it is inferred to be equal to 0. 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: CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries (7-155) The value of CurrentPaletteSize[startComp] is in the range from 0 to palette_max_size, inclusive.
[0093] new_palette_entries[cIdx][i] specifies the value for the i-th signaled palette entry for color component cIdx. The variable PredictorPaletteEntries[cIdx][i] specifies the i-th element in the predictor palette for color component cIdx. The variable CurrentPaletteEntries[cIdx][i] specifies the i-th element in the current palette for color component cIdx and is derived as follows: [Table 7]
[0094] palette_escape_val_present_flag equal to 1 specifies that the current coding unit contains at least one escape-coded sample. escape_val_present_flag equal to 0 specifies that there are no escape-coded samples in the current coding unit. If not present, the value of palette_escape_val_present_flag is inferred to be equal to 1. The variable MaxPaletteIndex specifies the maximum possible palette index for the current coding unit. The value of MaxPaletteIndex is CurrentPaletteSize[startComp]-1+palette_escape_val_presen_flag is set equal to
[0095] palette_idx_idc is an index into the palette table, CurrentPaletteEntries. The value of palette_idx_idc is in the range 0 to MaxPaletteIndex (inclusive) for the first index in the block, and in the range 0 to (MaxPaletteIndex-1) (inclusive) for the remaining indices in the block. If palette_idx_idc is not present, it is inferred to be equal to 0.
[0096] palette_transpose_flag equal to 1 specifies that a vertical traverse is applied to traverse the indices for samples within the current coding unit. palette_transpose_flag equal to 0 specifies that a horizontal traverse is applied to traverse the indices for samples within the current coding unit. If not present, the value of palette_transpose_flag is inferred to be equal to 0. The array TraverseScanOrder specifies the scan order array for palette coding. If palette_transpose_flag is equal to 0, TraverseScanOrder is assigned the horizontal scan order HorTravScanOrder, and if palette_transpose_flag is equal to 1, TraverseScanOrder is assigned the vertical scan order VerTravScanOrder.
[0097] run_copy_flag equal to 1 specifies that the palette run type is the same as the run type at the previously scanned position and the palette run index is the same as the index at the previous position if copy_above_palette_indices_flag is equal to 0. Otherwise, run_copy_flag is equal to 0.
[0098] 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 cross scanning is used, or the same position in the left column if vertical cross scanning is used. copy_above_palette_indices_flag equal to 0 specifies that an indication of the palette index of the sample is coded or inferred in the bitstream.
[0099] The variable CopyAboveIndicesFlag[xC][yC] equal to 1 specifies that the palette indices are copied from the palette indices in the row above (horizontal scan) or column to the left (vertical scan). CopyAboveIndicesFlag[xC][yC] equal to 0 specifies that the palette indices are either explicitly coded in the bitstream or inferred. The array indices xC, yC specify the sample location (xC, yC) relative to the top-left luma sample of the picture.
[0100] The variables PaletteIndexMap[xC][yC] specify a palette index, which is an index into the array represented by CurrentPaletteEntries. The array indices xC, yC specify the sample's location (xC, yC) relative to the top-left luma sample of the picture. The value of PaletteIndexMap[xC][yC] is in the range from 0 to MaxPaletteIndex (inclusive).
[0101] The variable adjustedRefPaletteIndex is derived as follows: [Table 8] If CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows: if(CurrPaletteIndex>=adjustedRefPaletteIndex) CurrPaletteIndex++ (7-158)
[0102] palette_escape_val specifies the quantized escape-coded sample value for a component. The variable PaletteEscapeVal[cIdx][xC][yC] specifies the escape value for samples for which PaletteIndexMap[xC][yC] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1. The array index cIdx specifies the color component. The array indices xC, yC specify the location (xC, yC) of the sample relative to the luma sample in the top-left corner of the picture. PaletteEscapeVal[cIdx][xC][yC] is a range from 0 to (1<<(BitDepth Y +1)-1 inclusive and 0 to (1<<(BitDepth C The bitstream conformance requirement is that the bitstream is within the range +1))-1) inclusive.
[0103] 2.3 Local Dual Tree in VVC In typical hardware video encoders and decoders, when a picture has many small intra blocks, the processing throughput decreases due to the sample processing data dependency between neighboring intra blocks. The predictor generation for an intra block requires reconstructed samples of its top and left boundaries from neighboring blocks. Thus, intra prediction must be processed sequentially, block by block.
[0104] In HEVC, the smallest CU is an 8x8 luma sample. 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 a 4x4 chroma intra block or a 4x4 luma intra block is processed.
[0105] In VTM5.0, in a single coding tree, the chroma partition always follows luma, and the smallest intra CU is 4x4 luma samples, so the smallest chroma-intra CB is 2x2. Therefore, in VTM5.0, the smallest chroma-intra CB in a single coding tree is 2x2. The worst-case hardware processing throughput for VVC decoding is only one-quarter of that for HEVC decoding. Furthermore, the reconstruction process of chroma-intra CB is much more complex than that for HEVC after employing tools including a cross-component linear model (CCLM), a 4-tap interpolation filter, position-dependent intra prediction combination (PDPC), and combined inter intra prediction (CIIP). Achieving high processing throughput in a hardware decoder is difficult. In this section, a method is proposed to improve the worst-case hardware processing throughput.
[0106] The goal of this method is to forbid chroma-intra CBs smaller than 16 chroma samples by constraining the partitioning of chroma-intra CBs.
[0107] In a single coding tree, an SCIPU is defined as a coding tree node with at least one child luma block whose chroma block size is equal to or greater than TH chroma samples and smaller than 4 luma samples, where TH is set to 16 in this contribution. For each SCIPU, it is required that either all CBs are inter or all CBs are non-inter, i.e., either intra or IBC. For non-inter SCIPUs, it is further required that the chroma of the non-inter SCIPU is not further split, and the luma of the SCIPU is allowed to be further split. Thus, the minimum chroma-intra CB size is 16 chroma samples, and 2x2, 2x4, and 4x2 chroma CBs are eliminated. Furthermore, chroma scaling is not applied for non-inter SCIPUs. Furthermore, if the luma block is further split and the chroma block is not split, a local dual-tree coding structure is constructed.
[0108] Two examples of SCIPUs are shown in Figure 5A and B. In Figure 5A, one chroma CB and three luma CBs (4x8, 8x8, 4x8 luma CBs) of an 8x4 chroma sample form one SCIPU because ternary tree (TT) division from an 8x4 chroma sample results in a chroma CB smaller than 16 chroma samples. In Figure 5B, one chroma CB (on the left side of the 8x4 chroma sample) and three luma CBs (8x4, 4x4, 4x4 luma CBs) of a 4x4 chroma sample form one SCIPU, and the other chroma CB (on the right side of the 8x4 chroma sample) and two luma CBs (8x4, 8x4 luma CBs) of a 4x4 sample form one SCIPU. This is because a binary tree (BT) division from 4x4 chroma samples results in a chroma CB that is smaller than 16 chroma samples.
[0109] In the proposed method, if the current slice is an I slice or the current SCIPU has a 4x4 luma partition in it after one further division, the type of the SCIPU is presumed to be non-inter (because inter 4x4 is not allowed in VVC); otherwise, the type of the SCIPU (inter or non-inter) is indicated by a single signaled flag before parsing the CU in the SCIPU.
[0110] 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. The worst-case hardware processing throughput is the same as for HEVC and four times higher than for VTM5.0.
[0111] 2.4 Conversion Skip (TS) As in HEVC, the residual of a block can be coded in transform skip mode. To avoid syntax coding redundancy, the transform skip flag is not signaled if the CU-level MTS_CU_flag is not equal to zero. The block size restriction for transform skip is the same as for MTS in JEM4. This indicates that transform skip can be applied to a CU if both the block width and height are less than or equal to 32. Note that if LFNST or MIP is activated for the current CU, the implicit MTS transform is set to DCT2. Also, implicit MTS can be enabled even if MTS is enabled for inter-coded blocks.
[0112] Also, for transform skip blocks, the minimum allowed quantization parameter (QP) is defined as 6*(internalBitDepth-inputBitDepth)+4.
[0113] 2.5 Alternative Luma Half-Pixel Interpolation Filters In JVET-N0309, an alternative half-pixel interpolation filter is proposed.
[0114] The switching of half-pixel luma interpolation filters is done depending on the motion vector precision. In addition to the existing quarter-pixel, full-pixel, and 4-pixel AMVR modes, a new half-pixel precision AMVR mode is introduced. Only in the case of half-pixel motion vector precision can an alternative half-pixel luma interpolation filter be selected.
[0115] For non-affine, non-merge inter-coded CUs that use half-pel motion vector precision (i.e., half-pel AMVR mode), switching between the HEVC / VVC half-pel luma interpolation filter and one or more alternative half-pel interpolators is based on the value of the new syntax element hpelIfIdx. The syntax element hpelIfIdx is signaled only in half-pel AMVR mode. For skip / merge modes that use spatial merge candidates, the value of the syntax element hpelIfIdx is inherited from neighboring blocks.
[0116] 2.6 Adaptive Color Transform (ACT) Figure 6 shows a decoding flowchart in which ACT is applied. As shown in Figure 6, color space conversion is performed in the residual domain. Specifically, one additional decoding module, namely, inverse ACT, is introduced after the inverse transform to convert the residual from the YCgCo domain back to the original domain.
[0117] In VVC, a single coding unit (CU) leaf node is also used as the unit of transform processing unless the maximum transform size is smaller than the width or height of one CU. Therefore, in the proposed implementation, an ACT flag is signaled for one CU to select the color space for coding the residual. Furthermore, according to the HEVC ACT design, for inter and IBC CUs, ACT is enabled only if there is at least one non-zero coefficient in the CU. For intra CUs, ACT is enabled only if the chroma components select the same intra prediction mode of the luma component, i.e., DM mode. The core transforms used for color space conversion are kept the same as those used for HEVC. Specifically, the following forward and inverse YCgCo color transformation matrices are applied:
number
[0118] Furthermore, to compensate for the dynamic range change of the residual signal before and after color transformation, a QP adjustment of (-5, -5, -3) is applied to the transformed residual. On the other hand, the forward and inverse color transforms require access to the residuals of all three components. Correspondingly, in the proposed implementation, ACT is disabled in the following two scenarios where the residuals of all three components are not available: 1. Separate-tree partition: When separate-tree partitioning is applied, the luma and chroma samples in one CTU are partitioned by different structures. As a result, the CU in the luma tree contains only the luma component, and the CU in the chroma tree contains only two chroma components. Intra sub-partition prediction (ISP): ISP sub-partitioning is only applied to luma, while the chroma signal is coded without partitioning. In the current ISP design, except for the last ISP sub-partitions, the other sub-partitions contain only the luma component.
[0119] 3. Technical Problems Solved by the Technical Solutions and Embodiments Described Herein 1. The current binarization of escape symbols is not fixed length, which may be suitable for sources with uniform distribution. 2. The current palette coding design performs an index adjustment process to remove possible redundancies, which can introduce parsing dependencies, for example if the escape value index is derived incorrectly. 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. 4. When local dual trees are enabled, the palette items in the previous and current blocks may have different numbers of color components. It is unclear how to handle such cases. 5. Local dual tree and PLT could not be applied simultaneously because some palette items may be repeated when coding from a single tree region to a dual tree region. An example is shown in Figure 7. 6. Chroma QP table for joint_cbcr mode may be constrained. 7. Under certain conditions, escape samples can become redundant. 8. Line-based CG mode could not be processed at high throughput.
[0120] 4. List of embodiments and solutions The following list should be considered as examples to illustrate the general concept. These items should not be interpreted narrowly. Furthermore, these items can be combined in any way.
[0121] The following examples can be applied to palette methods in VVC and all other palette-related methods.
[0122] In the following sections, Qp may refer to qP in Section 8.4.5.3 of JVET-P2001-vE.
[0123] In the following sections, QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode.
[0124] Modulo(x,M) is defined as (x%M) if x is a positive integer, and M-(-x)%M otherwise.
[0125] In the following, a block coded in lossless mode may mean a block coded with tranquant_bypass_flag equal to 1 or a block coded with a QP not greater than a given threshold and transform_skip_flag equal to 1.
[0126] The following examples can be applied to palette methods in VVC and all other palette-related methods.
[0127] 1. Fixed length coding may be applied to code escape symbols. In one example, escape symbols may be signaled in fixed-length binary notation. b. In one example, the escape symbol may be signaled in a fixed-length binary representation using N bits. c. In one example, the code length (e.g., N referred to in item 1.b) for signaling escape symbols may depend on the internal bit depth. Alternatively, the code length for signaling the escape symbols may depend on the input bit depth. ii. Alternatively, the code length for signaling the escape symbols may depend on the difference between the internal bit depth and the input bit depth. iii. In one example, N is set equal to the input / internal bit depth. d. In one example, the length of the fixed length coding may be signaled at a video processing unit level, for example, slice, sub-picture, tile, picture, video. e. In one example, the code length for signaling escape symbols (e.g., N referred to in item 1.b) may depend on the quantization parameter, i.e., Qp. i. In one example, the code length for signaling escape symbols may be a function of a quantization parameter, as denoted by f(Qp). 1. In one example, the function f may be defined as (internal bit depth - g(Qp)). 2. In one example, N may be set to (internal bit depth-max(16,(Qp-4) / 6)). 3. In one example, N may be set to (internal bit depth - max(QpPrimeTsMin, (Qp-4) / 6)), where qP is the decoded quantization parameter and QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode. 4. Alternatively or additionally, the code length N may be set to max(A, internal bit depth-(Max(QpPrimeTsMin,Qp)-4) / 6), where A is a non-negative integer value such as 0 or 1. ii. The Qp mentioned in the above subsection may refer to slice QP. 1. Alternatively, Qp may refer to the slice QP plus a constant value. f. In the above examples, N may be 0 or greater.
[0128] 2. Dequantization Qp for escape symbols may be based on slice / picture / PPS level Qp. a. In one example, the dequantization Qp for escape symbols may be based on the slice / picture / PPS level Qp plus a given offset. i. The offset may be a constant. ii. The offset may be indicated in the bitstream either implicitly or explicitly. b. In one example, block-level Qp differences may be skipped in the bitstream. i. In one example, cbf may be estimated to be 0.
[0129] 3. For escape symbols, a left shift may be applied before dequantization. a. In one example, a left shift of N bits (N>=0) may be applied before dequantization. i. In one example, N may be equal to Min(bitDepth-1, (QpPrimeTsMin-4) / 6), where bitDepth is the internal bit depth. ii. Alternatively, N may be equal to bitDepth-inputBD, where inputBD is the input bit depth. 1. In one example, inputBD may be indicated in the bitstream. iii. Alternatively, N may be equal to deltaBD, where deltaBD is indicated in the bitstream.
[0130] 4. Dequantization of escape symbols may depend on (Qp-QpPrimeTsMin). a. In one example, (Qp-QpPrimeTsMin+4) may be applied for dequantization of the escape symbol as dequantization Qp. b. In one example, Min(Qp-QpPrimeTsMin+4,63+QpBdOffset) may be applied for dequantization of the escape symbol as the dequantized Qp.
[0131] 5. Dequantization of escape symbols may depend on (Qp-N*6). In one example, N may refer to the number of left shifts in item 3.a. b. In one example, Max(0, Qp-N*6) may be applied as the dequantization Qp.
[0132] 6. The dequantization of escape symbols may depend on deltaBD, i.e., the difference between the internal bit depth and the input bit depth. a. In one example, (Qp-deltaBD*6) may be applied for dequantization of escape symbols as dequantization Qp. b. In one example, Min(Max(0,Qp-deltaBD*6),63+QpBdOffset) may be applied for dequantization of escape symbols as dequantization Qp.
[0133] 7. It is proposed to disable the use of escape symbols within a single video unit (e.g., CU). a. Alternatively, and in addition, signaling the presence of an escape symbol is skipped. b. In one example, enabling / disabling the use of escape symbols may depend on the quantization parameter and / or bit depth. i. In one example, if (internal bit depth - (Max(QpPrimeTsMin,Qp) - 4) / 6) is not greater than 0, the use of escape symbols may be disabled.
[0134] 8.3 Variable length coding, except for the following EG, may be applied to code escape symbols. In one example, the binarization of the escape symbol may be truncated binary (TB) with an input parameter K. b. In one example, the binarization of the escape symbol may be EG of degree K, where K is not equal to 3. i. In one example, the binarization of the escape symbol may be EG of order 0. 1. Alternatively, in one example, the binarization of the escape symbol may be EG of order 1. 2. Alternatively, in one example, the binarization of the escape symbol may be EG of order 2. c. In the above examples, K may be an integer and may depend on: Messages signaled in i.SPS / VPS / PPS / Picture Header / Slice Header / Tile Group Header / LCU Row / LCU Group / Brick. ii. Internal Bit Depth iii. Input bit depth iv. The difference between the internal bit depth and the input depth v. Block dimensions of the current block vi. Current quantization parameters for the current block vii. Color format indication (4:2:0, 4:4:4, RGB or YUV, etc.) viii. Coding structure (e.g., single-tree or dual-tree) ix. Color components (e.g., luma and / or chroma components)
[0135] 9. Multiple binarization methods for coding the escape symbol may be applied to a video unit (e.g., sequence / picture / slice / tile / brick / subpicture / CTU row / CTU / CTB / CB / CU / subregion within a picture) and / or to one or more values of the escape symbol. a. In one example, how to select one of multiple binarization methods may be signaled for one or more values of video units and / or escape symbols. b. In one example, how to select one of a plurality of binarization methods may be derived for one or more values of the video units and / or escape symbols. c. In one example, more than one binarization method may be applied to one or more values of a video unit and / or escape symbol. i. In one example, an index or flag may be encoded / decoded to signal the selected binarization method.
[0136] In the following sections, p may represent a symbol value of a color component, bd may represent a bit depth (e.g., internal bit depth or input bit depth), ibd may represent an input bit depth, and Qp may represent a quantization parameter for a transform skip block or a transform block. Furthermore, the QP for the luma and chroma components may be different or the same. A bit depth may be associated with a given color component.
[0137] 10. How the quantization and / or dequantization process is applied may depend on whether the block is coded in palette mode or not. a. In one example, the quantization and / or dequantization process for escape symbols may be different from that used for regular intra / inter-coded blocks to which quantization is applied.
[0138] 11. The quantization and / or dequantization process for escape symbols may use bit shifting. In one example, a right bit shift may be used to quantize the escape symbol. i. In one example, the escape symbol may be signaled as f(p, Qp), where p is the input symbol value (e.g., input luma / chroma sample value) and Qp is the derived quantization parameter for the corresponding color component. 1. In one example, a function f may be defined as p>>g(Qp). 2. In one example, the function f may be defined as (p+(1<<(g(QP)-1))>>g(Qp)). 3. In one example, the function f is (0, (1< <bd)-1,(p+(1<<(g(QP)-1)))> g(Qp)). ii. In one example, the escape symbol may be signaled as h(p). 1. In one example, a function h may be defined as p>>N. 2. In one example, the function h may be defined as (p+(1<<(N-1)))>>N. 3. In one example, if cu_transquant_bypass_flag is equal to 1, then N may be set to 0. 4. In one example, when cu_transquant_bypass_flag is equal to 1, N may be equal to (bd - ibd). Here, bd is the internal bit depth, and ibd is the input bit depth. 5. In one example, the function h may be defined as clip(0, (1 << (bd - N) - 1, p >> N), where bd is the internal bit depth for the current color component. 6. In one example, the function h may be defined as clip(0, (1 << (bd - N) - 1, (p + (1 << (N - 1))) >> N), where bd is the internal bit depth for the current color component. 7. In the above example, N may be in the range of [0, (bd - 1)]. b. In one example, a left bit shift may be used to inverse-quantize an escape symbol. i. In one example, the escape symbol may be dequantized as f(p, Qp). Here, p is the decoded escape symbol, and Qp is the derived quantization parameter for the corresponding color component. 1. In one example, f may be defined as p << g(Qp). 2. In one example, f may be defined as (p << g(Qp)) + (1 << (g(Qp) - 1)). ii. In one example, the escape symbol may be reconstructed as f(p, Qp). Here, p is the decoded escape symbol. 1. In one example, f may be defined as clip(0, (1 << bd) - 1, p << g(Qp)). 2. In one example, f may be defined as clip(0, (1 << bd) - 1, (p << g(Qp)) + (1 << (g(Qp) - 1))). iii. In one example, the escape symbol may be reconstructed as h(p). 1. In one example, the function h may be defined as p << N. 2. In one example, the function h may be defined as (p << N) + (1 << (N - 1)). 3. In one example, if cu_transquant_bypass_flag is equal to 1, then N may be set to 0. 4. In one example, if cu_transquant_bypass_flag is equal to 1, N may be equal to (bd-ibd), where bd is the internal bit depth and ibd is the input bit depth. 5. In one example, N is 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. 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 for different color components. 6. Alternatively, for the above examples, N may be further clipped, such as to min(bd-1,N). 7. In the above example, N may be in the range [0, (bd-1)].
[0139] 12. When applying a left shift as dequantization, the reconstruction offset of the escape symbol p may depend on the bit depth information. In one example, it may depend on the difference between the internal bit depth and the input bit depth, ie, deltaBD=internal bit depth−input bit depth. If bK is less than or equal to deltaBD, the reconstructed value is p< <Kであってもよい。 If cK is greater than deltaBD, the reconstruction value is (p< <K)+(1<<(K-1))であってもよい。 If dK is less than or equal to T0 (for example, T0=2), the reconstructed value is p< <Kであってもよい。 If eK is greater than T1 (e.g., T1=2), the reconstruction value is (p< <K)+(1<<(K-1))であってもよい。 f. In one example, T0 and T1 in items d and e may be signaled in the bitstream at the sequence / picture / slice / tile / brick / subpicture level, etc. g. In one example, the reconstruction value is (p< <K)+((1<<(K-1)> >deltaBD< <deltaBD))であってもよい。 h. In one example, the reconstruction value is ((p<<(K+1))+(1<<K))> >(deltaBD+1)< <deltaBD)であってもよい。 i. In one example, deltaBD may be signaled in the bitstream at the sequence / picture / slice / tile / brick / subpicture level, etc. j. In one example, which reconstructed value is used (eg, items b through e) may depend on the quantization parameter of the current block. k. In one example, which reconstruction value is used (eg, items b through e) may depend on the value of deltaBD. l. In one example, K may be set to g(Qp).
[0140] 13. In the above examples, the following may apply: In one example, escape symbols may be context coded. b. In one example, an escape symbol may be bypass coded. c. In one example, g(Qp) may be defined as (Qp-4) / 6 or QP / 8. i. Alternatively, g(Qp) may be defined as Qp / 6 or QP / 8. ii. Alternatively, g(Qp) may be defined as max(16,Qp / 6). iii. Alternatively, g(Qp) may be defined as max(16,(Qp-4) / 6). iv. Alternatively, g(Qp) may be defined as max((bd-ibd)*6+4,(Qp-4) / 6). v. Alternatively, g(Qp) may be defined as max(M, (Qp - 4) / 6). 1. In one example, M may be signaled to the decoder. vi. Alternatively, g(Qp) may be defined as max((M, Qp) - 4) / 6. 1. In one example, M may be indicated in the SPS. 2. In one example, the same M or different Ms may be applied to the luma component and the chroma component. 3. In one example, M may be equal to (bd - ibd)*6 + 4. vii. Alternatively, g(Qp) may be defined as Qp / 6 or QP / 8. viii. Alternatively, g(Qp) may be defined as (max(16, Qp) / 6). ix. Alternatively, g(Qp) may be defined as (max(16, Qp) - 4) / 6. d. In one example, the value of g(Qp) may be in the range of [0, (bd - 1)]. e. In one example, the maximum function max(a, i) may be defined as (i <= a? a : i). i. Alternatively, in one example, the maximum function max(a, i) may be defined as (i < a? a : i). f. In one example, N may be an integer (e.g., 8 or 10) and may depend on the following: i. Messages signaled in the SPS / VPS / PPS / picture header / slice header / tile group header / LCU row / group of LCUs / brick ii. Internal bit depth iii. Input bit depth iv. Difference between the internal bit depth and the input depth v. Block size of the current block vi. Current quantization parameter of the current block vii. Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV) viii. Coding structure (such as single tree or dual tree) ix. Color components (e.g., luma and / or chroma components) x. Slice / Tile Group Type and / or Picture Type g. In one example, N may be signaled to a decoder.
[0141] 14. Qp for escape values may be clipped. In one example, the lowest Qp applied to the escape value may be equal to min_qp_prime_ts_minus4. b. In one example, the minimum Qp applied to the escape value may be related to min_qp_prime_ts_minus4. i. In one example, the lowest Qp applied to the escape value may be equal to min_qp_prime_ts_minus4+4. c. In one example, the minimum Qp for each color component may be indicated in the SPS / PPS / VPD / DPS / tile / slice header. 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 indicates the input bit depth for a color component. e. In one example, the above examples may be applied to a color component.
[0142] 15. In the above examples, the chroma Qp for the escape value may use Qp before / after mapping.
[0143] 16. It is proposed that in palette mode the reference index not be used to derive the current palette index. a. In one example, the palette index may be signaled directly without precluding the possibility of a reference index (e.g., adjustedRefPaletteIndex). Alternatively, in one example, the encoder may be constrained to always allow the reference index to be different from the current index. In such a case, the palette index may be signaled by eliminating the possibility of the reference index. b. In one example, the binarization of the palette index may be Truncated Binary (TB) which involves using the maximum palette index as the binarization input parameter. c. In one example, the binarization of the palette index may be fixed length. d. In one example, the binarization of the palette index may be EG of order K. i. In one example, K may be an integer (e.g., 1, 2, or 3) and may depend on: 1. Messages signaled in SPS / VPS / PPS / Picture Header / Slice Header / Tile Group Header / LCU Row / LCU Group / Brick 2. Internal Bit Depth 3. Input Bit Depth 4. Difference between internal bit depth and input depth 5. Block dimensions of the current block 6. Current quantization parameter for the current block 7. Color format indication (4:2:0, 4:4:4, RGB, or YUV, etc.) 8. Coding structure (e.g., single tree or dual tree) 9. Color components (e.g., luma and / or chroma components) e. In one example, the above examples may only apply if the current block has at least one escape sample.
[0144] 17. The current palette index may be signaled independently of previous palette indexes. a. In one example, whether and / or how to use previous palette indices may depend on whether there are escape sample(s) in the current block.
[0145] 18. Derivations from indices for escaped symbols to indices for non-escaped symbols may not be allowed. a. In one example, if escape symbols are applied and the palette index is not equal to the index for the escape symbol, decoding those symbols as escape symbols may not be allowed.
[0146] 19. Derivations from indices for non-escaped symbols to indices for escaped symbols may not be allowed. a. In one example, if escape symbols are applied and the palette index is equal to the index for the escape symbols, decoding those symbols as non-escaped symbols may not be allowed.
[0147] 20. The derived pallet index may be capped by the current pallet table size. In one example, if the palette index is greater than MaxPaletteIndex, it may be modified to be equal to MaxPaletteIndex.
[0148] 21. Derived palette indices may be capped by the current palette table size, except for indexes for escape symbols. a. In one example, if no escape symbols are applied and the palette index is greater than MaxPaletteIndex, it may be modified to be equal to MaxPaletteIndex. b. In one example, if an escape symbol is applied and the palette index is greater than (MaxPaletteIndex-1), it may be modified to be equal to (MaxPaletteIndex-1).
[0149] 22. Indexes indicating escape symbols may not be allowed to be modified. In one example, an index equal to MaxPaletteIndex may always indicate an escape symbol if an escape symbol exists in the current block. b. In one example, an index that is not equal to MaxPaletteIndex cannot be decoded as an index indicating an escape symbol.
[0150] 23. It is proposed to code the difference between the reference index and the current index. In one example, differences equal to 0 may not be allowed to be coded. b. Alternatively, for the first index in a palette-coded block, the index may be directly coded.
[0151] 24. It is proposed to code the modulo of the difference between the reference index (denoted R) and the current index (denoted C). a. In one example, I=Modulo(CR, MaxPaletteIndex) may be coded. i. In one example, the index may be reconstructed as Modulo(I+R, MaxPaletteIndex). ii. In one example, Modulo(CR, MaxPaletteIndex) equal to 0 may not be allowed in the bitstream. iii. In one example, a truncated binary code where cMax=MaxPaletteIndex may be used to code the value. iv. Alternatively, for the first index in a palette-coded block, the index may be directly coded. b. In one example, I=Modulo(CR,MaxPaletteIndex)−1 may be coded. i. In one example, the index may be reconstructed as Modulo(I+1+R, MaxPaletteIndex). ii. In one example, Modulo(CR,MaxPaletteIndex)-1 less than 0 may not be allowed in the bitstream. iii. In one example, a truncated binary code with cMax=(MaxPaletteIndex−1) may be used to code the value / . iv. Alternatively, for the first index in the palette-coded block, Modulo(CR, MaxPaletteIndex) may be coded. v. Alternatively, for the first index in a palette-coded block, the index may be directly coded.
[0152] 25. At the start of decoding a palette block, the reference index R may be set equal to -1. Alternatively, the reference index R may be set equal to 0.
[0153] 26. It is proposed to enable palette mode and local dual tree exclusively. In one example, local dual trees may not be allowed when palette mode is enabled. Alternatively, in one example, palette mode may not be allowed if local dual trees are enabled. b. In one example, the local dual tree is not enabled for certain color formats, such as 4:4:4. c. In one example, palette mode may not be allowed if the coding tree is MODE_TYPE_INTRA. d. It is proposed to reset the palette predictor based on the use of local dual trees. i. In one example, the palette predictor may be reset when the single tree is switched to a local dual tree. ii. In one example, the palette predictor may be reset when the local dual tree is switched to a single tree. iii. Alternatively or additionally, signaling the use of items in the palette predictor (e.g., palette_predictor_run) may depend on the tree type. 1. In one example, when switching between local dual tree and single tree, signaling of usage of items in palette predictor (e.g., palette_predictor_run) is omitted.
[0154] 27. When local dual trees are applied, it is proposed to remove repeated palette entries in the palette prediction table. In one example, the palette prediction table may be reset when a local dual tree is applied. i. Alternatively, in one example, the decoder may check all palette items in the prediction table when the local dual tree is applied and remove items that are repeated. ii. Alternatively, in one example, the decoder may check for partial palette entries in the prediction table when the local dual tree is applied and remove repeated entries. iii. In one example, full pruning or partial pruning may be applied when checking pallet items. 1. In one example, a set of selected items may be checked (eg, the set includes all or partial palette items in the palette predictor). a) In one example, full pruning or partial pruning may be applied to selected items. 2. In one example, full pruning may represent that one item is compared to all items that may be added. 3. In one example, partial pruning may represent that one item is compared to partial items that may be added. iv. In one example, whether two palette items are the same may be based solely on whether their luma component values are the same. 1. Alternatively, in one example, whether two palette items are the same may be based solely on whether their chroma component values are the same. 2. Alternatively, in one example, whether two palette items are the same may be based on whether both their luma and chroma component values are the same. v. In one example, the above method may be applied to a luma block only when the local dual tree begins processing the luma component. 1. Alternatively, in one example, the above method may be applied to a chroma block only when the local dual tree begins processing the chroma component. vi. Alternatively, in one example, the encoder may add a constraint that two palette items are considered different if three components of the items are different.
[0155] 28. If the current palette entry has a different number of color components than the entry in the palette prediction table, the palette prediction table may not be allowed to be used. a. In one example, the reuse flag for all entries in the palette prediction table may be marked as true, but may not be used for the current block if the current palette entry has a different number of color components than the prediction. b. In one example, the reuse flag for all entries in the palette prediction table may be marked as false if the current palette entry has a different number of color components than the prediction.
[0156] 29. If the prediction table and the current palette table have different color component(s), the palette prediction table may not be allowed to be used. a. In one example, the reuse flag for all entries in a palette prediction table may be marked as true, but may not be used for the current block if the prediction table and the current palette table have different color components. b. In one example, the reuse flag for all entries in a palette prediction table may be marked as false if the prediction table and the current palette table have different color components.
[0157] 30. Escape symbols may be predictively coded, for example based on previously coded escape symbols. In one example, an escape symbol in one component may be predicted by a coded value in the same color component. i. In one example, an escape symbol may use a previously coded escape symbol in the same component as a predictor, and the residual between them may be signaled. ii. Alternatively, an escape symbol may use the previously coded Kth escape symbol in the same component as a predictor, and the residual between them may be signaled. iii. Alternatively, the escape symbol may be predicted from multiple (eg, K) coded escape symbols in the same component. 1. In one example, K may be an integer (e.g., 1, 2, or 3) and may depend on: a) Messages signaled in SPS / VPS / PPS / Picture Header / Slice Header / Tile Group Header / LCU Row / LCU Group / Brick b) Internal Bit Depth c) Input Bit Depth d) The difference between the internal bit depth and the input depth e) Block dimensions of the current block f) The current quantization parameter of the current block g) Color format indication (e.g., 4:2:0, 4:4:4, RGB, or YUV) h) Coding structure (e.g., single-tree or dual-tree) i) Color components (e.g., luma and / or chroma components) b. In one example, an escape symbol in one component may be predicted by the coded value of another component. 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 may be predicted by the value of a sample of another component. i. In one example, the U component of an escape symbol may be predicted by the V component of that symbol. d. In one example, the above methods may only be applied to certain color components (eg, to the luma component or the chroma component) or under certain conditions based on coded information, etc.
[0158] 31. Signaling of palette-related syntax elements may depend on the maximum size of the palette, and / or block dimensions, and / or the use of lossless mode and / or quantization parameter (QP). a. In one example, for lossless coded blocks and / or when the QP is below a threshold and / or when transform skipping is applied, the palette size of the block is estimated to be equal to the block dimensions. i. Alternatively, for lossless coded blocks and / or when the QP is less than or equal to a threshold, the palette size of the block is estimated to be equal to min(block dimensions, maximum palette size). b. Whether to signal the use of escape samples within a block may depend on the block dimension and / or the use of a lossless coding mode (e.g., whether QP is equal to a given value (e.g., 4); and / or whether transform_skip_flag is equal to 1; or whether transquant_bypass_flag is equal to true) and / or QP. i. Alternatively or additionally, whether to signal the use of an escape sample may depend on the relationship between the block dimensions of the current block and the current palette size. 1. In one example, whether to signal it may depend on whether the block dimensions are equal to the current palette size. a) Alternatively or additionally, if the block dimension is equal to the current palette size, it is not signaled and is presumed to be false. 2. Alternatively, whether to signal it may depend on whether the block dimensions are not smaller than the current palette size. a) Alternatively or additionally, if the block dimensions are not smaller than the current palette size, it is not signaled and is presumed to be false. ii. Alternatively or additionally, whether to signal the use of escape samples may depend on the relationship between block dimensions, maximum palette size, and / or lossless mode. 1. In one example, if a block is coded in lossless mode and the block dimensions are smaller than the maximum size of the palette, the signaling of the use of escape samples may be omitted and it is presumed to be false. 2. In one example, if a block is coded with a QP not greater than a threshold and the block dimensions are smaller than the maximum size of the palette, the signaling of the use of escape samples may be omitted and it is presumed to be false. iii. The indication of escape sample usage (e.g., palette_escape_val_present_flag) may be inferred under certain conditions. 1. In one example, if the current block size is less than or equal to the maximum allowed palette size (e.g., palette_max_size), the use escape sample indication may be presumed false. a) Alternatively, in one example, an indication of the use of escape samples may be signaled if the current block size is larger than the maximum allowed palette size. b) Alternatively, in one example, if the current block size is greater than the maximum allowed palette size, the indication to use escape samples may be presumed false. 2. In one example, the above methods can be applied under lossless coding conditions. 3. In one example, the above methods may be applied to a CU that is losslessly coded. 4. In one example, if the current block size is less than or equal to the current block's palette size, the escape sample use indication may be presumed false. 5. In one example, when an escape sample usage flag is inferred, the corresponding syntax element, e.g., palette_escape_val_present_flag, may be skipped in the bitstream.
[0159] 32. The context for run-length coding in palette mode may depend on the palette index for indexing palette items. a. In one example, the palette index after the index adjustment process at the decoder (described in Section 2.1.3) may be used to derive a context for the prefix of the length element (e.g., palette_run_prefix). b. Alternatively, in one example, I defined in item 13 may substitute a palette index to derive a context for the prefix of the length element (e.g., palette_run_prefix).
[0160] 33. It is proposed to align the positions of the left and / or above neighboring blocks used in the derivation process for the quantization parameter predictor with the positions of the nearby left and / or above neighboring blocks used in the mode / MV (e.g., MPM) derivation. a. The positions of the left and / or top neighboring blocks used in the derivation process for the quantization parameters may be aligned with the positions used in the merging / AMVP candidate list derivation process. b. In one example, the location of the neighboring left and / or above blocks used in the derivation process for the quantization parameters may be the left / above neighboring blocks shown in FIG.
[0161] 34. Block-level QP differential may be sent regardless of whether escape samples are present in the current block. In one example, whether and / or how to transmit block-level QP differences may follow blocks coded in modes other than palette. b. In one example, block-level QP differences may not always be sent for a given palette block. c. In one example, if the block width is greater than a threshold, a block-level QP difference may be sent for the palette block. d. In one example, a block-level QP difference may be sent for a palette block if the block height is greater than a threshold. e. In one example, if the block size is greater than a threshold, a block-level QP difference may be sent for the palette block. f. In one example, the above examples may apply only to luma blocks or chroma blocks.
[0162] 35. One or more of the coded block flags (CBF) for the palette block (e.g., cbf_luma, cbf_cb, cbf_cr) may be set to 1. In one example, the CBF for a pallet block may be set to always equal 1. b. One or more of the CBFs for a palette block may depend on whether an escape pixel is present in the current block. i. In one example, if a palette block has an escape sample, its cbf may be set to 1. ii. Alternatively, if a palette block has no escape samples, its cbf may be set to 0. c. Alternatively, when accessing a neighboring palette-coded block, it may be treated as an intra-coded block with a CBF equal to one.
[0163] 36. The luma and / or chroma QP applied to a palette block and the QP derived for that block (e.g., Qp in the JVET-O2001-vE specification) Y or Qp' Y ) may be set equal to a fixed value for various pallet blocks. In one example, the luma and / or chroma QP offsets may be set to 0. b. In one example, the chroma QP offsets for Cb and Cr may be different. c. In one example, the luma QP offset and the chroma QP offset may be different. d. In one example, the chroma QP offset(s) may be indicated in the DPS / VPS / SPS / PPS / slice / brick / tile header.
[0164] 37. Num PltIdxThe number of palette indices (e.g., num_palette_indices_minus1+1) explicitly signaled or inferred for the current block, denoted by K, may be constrained to be greater than or equal to K. a. In one example, K may be determined based on the current palette size, escape flags, and / or other information of the palette-coded block. Let S be the current palette size of the current block, E be the value of the escape present flag (e.g., palette_escape_val_present_flag), and BlkS be the current block size. In one example, K may be set equal to S. ii. Alternatively, in one example, K may be set equal to S+E. 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) (e.g., NumPredictedPaletteEntries + num_signalled_palette_entries + palette_escape_val_present_flag). iv. Alternatively, in one example, K may be set equal to (the maximum value of the palette index (e.g., MaxPaletteIndex) + 1). v. Alternatively, in one example, K may be signaled to the decoder. i. In one example, K may be a fixed integer value. ii. In one example, K is an integer and may be determined based on: 1. Previously coded block / decoded information of the current block 2. Quantization parameters of the current block / neighboring (adjacent or non-adjacent) blocks 3. Video content (e.g., screen content or natural content) 4. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture Header / Slice Header / Tile Group Header / Largest Coding Unit (LCU) / Coding Unit (CU) / LCU Row / Group of LCUs / TU / PU Block / Video Coding Unit 5. CU / PU / TU / Block / Video Coding Unit Location 6. Block dimensions of the current block and / or its neighboring blocks 7. Block shapes of the current block and / or its neighboring blocks 8. Color format indication (4:2:0, 4:4:4, RGB, or YUV, etc.) 9. Coding tree structure (e.g., dual tree or single tree) 10. Slice / Tile Group Type and / or Picture Type 11. Color Components (e.g., may only be applied to luma and / or chroma components) 12. Temporal Layer ID 13. Standard Profile / Level / Tier b. In one example, use (Num_palette_indices_minus1 instead of num_palette_indices_minus1. PltIdx -K) may be signaled / parsed. i. Alternatively, and in addition, it may be signaled only if (S+E) is not less than 1. ii. In one example, (Num PltIdx The m-th EG code (K) values may be signaled in a binarized manner, where the binarized bin string may have a prefix (e.g., truncated unary) and / or a suffix with the m-th EG code. iii. In one example, (Num PltIdx -K) values may be signaled using the truncated binary binarization method. iv. In one example, (NumPltIdx -K) values may be signaled in a truncated unary binarization method. v. In one example, (Num PltIdx −K) may be signaled in the m-th EG binarization method. vi. In one example, the value of BlkS-K may be used as an input parameter (e.g., cMax) in the binarization methods described above, such as being used as the maximum value for the truncated unary / truncated binary binarization methods. c. In one example, the conforming bitstream is PltIdx is greater than or equal to K. d. In one example, the conforming bitstream is Num PltIdx is less than or equal to K'. i. In one example, K' is set to (block width * block height). ii. In one example, K' is set to (block width * block height - K).
[0165] 38. Whether and / or how to apply the above methods may be based on: a. Video content (e.g., screen content or natural content) b. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture Header / Slice Header / Tile Group Header / Largest Coding Unit (LCU) / Coding Unit (CU) / LCU Row / Group of LCUs / TU / PU Block / Video Coding Unit c. CU / PU / TU / Block / Video Coding Unit Location d. Block dimensions of the current block and / or its neighboring blocks e. Block shape of the current block and / or its neighboring blocks f. Color format indication (e.g., 4:2:0, 4:4:4, RGB, or YUV) g. Coding tree structure (e.g., dual tree or single tree) h. Slice / Tile Group Type and / or Picture Type i. Color components (e.g., may only be applied to the luma and / or chroma components) j.Temporal Layer ID k. Standard profile / level / tier l. Whether the current block has one escape sample i. In one example, the above methods may be applied only if the current block has at least one escape sample. m. Whether the current block is coded in lossless mode (e.g., cu_transquant_bypass_flag) i. In one example, the above methods may be implemented such that the current block is coded in a lossless mode. do not have This may only be applicable in certain cases. n. Whether lossless coding is enabled (e.g., transquant_bypass_enabled, cu_transquant_bypass_flag) i. In one example, the above methods may only be applied if lossless coding is disabled.
[0166] Line-based CG palette mode related 39. It may be indicated for each CG whether these are escape samples. a. In one example, for each CG, a syntax element, such as palette_escape_val_present_flag, may be sent in the bitstream to indicate whether an escape sample is present. i. In one example, palette_escape_val_present_flag may be estimated or signaled based on the CG size, the number of decoded samples in the current block, and / or the palette size of the current block. b. In one example, if there are no escape samples for the current CG, an index adjustment may be applied. c. In one example, if an escape sample exists for the current CG, no index adjustment should be applied. d. Alternatively, the above methods may be applied only if the current block contains an escape sample.
[0167] 40. In line-based CG palette mode, the instruction to use copy above indices (e.g., copy_above_palette_indices_flag) does not need to be context coded. e. Alternatively, in one example, the indication for using copy above indices (e.g., copy_above_palette_indices_flag) may be bypass coded without using any context. i. In one example, the indication of use of copy above indexes (e.g., copy_above_palette_indices_flag) and the copy in current segment flag (e.g., run_copy_flag) may be signaled interleaved. f. In one example, an indication of the use of copy above indices (e.g., copy_above_palette_indices_flag) may be coded after all copy flags (e.g., run_copy_flag) in the current segment. g. In one example, the indication of use of copy above indices (e.g., copy_above_palette_indices_flag) and the signaled indices may be coded interleaved. h. The above methods may also be applied to other palette-based coding modes.
[0168] 41. The copy flag, run type, indication of use of copy on index, and escape value may be signaled interleaved. i. In one example, a first copy flag, a run type, an indication of the use of a copy on index, and an escape value may be coded in that order; followed by a second copy flag, a run type, an indication of the use of a copy on index, and an escape value. j. Alternatively or additionally, for a given CG, the above method may be applied.
[0169] 42. The line-based CG palette mode may be disabled for blocks of size below a given threshold, denoted Th. k. In one example, Th is equal to the number of samples in the segment in line-based CG palette mode. l. In one example, Th is a fixed number (e.g., 16) and may be based on i. Video content (e.g., screen content or natural content) ii. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture Header / Slice Header / Tile Group Header / Largest Coding Unit (LCU) / Coding Unit (CU) / LCU Row / Group of LCUs / TU / PU Block / Video Coding Unit iii. CU / PU / TU / Block / Video Coding Unit Location iv. Block dimensions of the current block and / or its neighboring blocks v. Block shape of the current block and / or its neighboring blocks vi. Color format indication (e.g., 4:2:0, 4:4:4, RGB, or YUV) vii. Coding tree structure (e.g., dual tree or single tree) viii. Slice / Tile Group Type and / or Picture Type ix. Color Components (e.g., may only apply to luma and / or chroma components) x.Temporal Layer ID xi. Standard profile / level / tier xii. Quantization parameters for the current block xiii. Whether the current block has one escape sample xiv. Whether lossless coding is enabled (e.g., transquant_bypass_enabled, cu_transquant_bypass_flag)
[0170] BDPCM related 43. When a block is coded with BDPCM and is divided into multiple transform blocks or sub-blocks, residual prediction may be performed at the block level and residual signaling is performed at the sub-block / transform block level. a. Alternatively or additionally, the reconstruction of one sub-block is not allowed in the reconstruction process of another sub-block. b. Alternatively, residual prediction and residual signaling can be done at the sub-block / transform block level. i. In this way, the reconstruction of one sub-block can be utilized in the reconstruction process of another sub-block.
[0171] Chroma QP Table Related 44. For a given index, the value of the chroma QP table for the 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. c. In one example, the values of the chroma QP table for the joint_cb_cr mode may be constrained to be between (inclusively) the values of the chroma QP table for Cb and the values of the chroma QP table for Cr.
[0172] Unblocking related 45. The comparison of MVs in deblocking may depend on whether an alternative half-pel interpolation filter is used (e.g., indicated by hpelIfIdx in the JVET-O2001-vE specification). d. In one example, blocks that use different interpolation filters may be treated as having different MVs. e. In one example, when an alternative half-pixel interpolation filter is involved, a constant offset may be added to the MV difference for deblocking comparison.
[0173] Common complaints 46. Whether and / or how to apply the above methods may be based on: a. Video content (e.g., screen content or natural content) b. Messages signaled in DPS / SPS / VPS / PPS / APS / Picture Header / Slice Header / Tile Group Header / Largest Coding Unit (LCU) / Coding Unit (CU) / LCU Row / Group of LCUs / TU / PU Block / Video Coding Unit c. CU / PU / TU / Block / Video Coding Unit Location d. Block dimensions of the current block and / or its neighboring blocks e. Block shape of the current block and / or its neighboring blocks f. Quantization parameter of the current block g. Color format indication (e.g., 4:2:0, 4:4:4, RGB, or YUV) h. Coding tree structure (e.g., dual tree or single tree) i. Slice / Tile Group Type and / or Picture Type j. Color components (e.g., may only apply to luma and / or chroma components) k.Temporal Layer ID l. Standard profile / level / tier m. Whether the current block has one escape sample i. In one example, the above methods may be applied only if the current block has at least one escape sample. n. Whether the current block is coded in lossless mode (e.g., cu_transquant_bypass_flag) ii. In one example, the above methods may be implemented such that the current block is coded in a lossless mode. do not have This may only be applicable in certain cases. o. Whether lossless coding is enabled (e.g., transquant_bypass_enabled, cu_transquant_bypass_flag)
[0174] 5. Implementation The implementation is based on JVET-O2001-vE. Newly added text is enclosed in double brackets, e.g., {{a}} indicates that an "a" is added. Deleted text is enclosed in double brackets, e.g., [[b]] indicates that a "b" is deleted.
[0175] 5.1 Embodiment #1 Palette Mode Decoding Process The inputs to this process are: Position (xCb, yCb) that specifies the top-left luma sample of the current block relative to the top-left luma sample of the current picture · startComp variable that specifies the first color component in the palette table The variable cIdx, which specifies the color component of the current block, Two variables nCbW and nCbH that specify the width and height of the current block, respectively. 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, y=0..nCbH-1.
[0176] Depending on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows: If cIdx is equal to 0, nSubWidth is set to 1 and nSubHeight is set to 1. Otherwise, nSubWidth is set to SubWidthC and nSubHeight is set to SubHeightC.
[0177] A (nCbW × nCbH) block of the reconstructed sample array recSamples at location (xCb, yCb) is represented by recSamples[x][y] (x=0..nCTbW-1 and y=0..nCbH-1), where the value of recSamples[x][y] for each x in the range 0 to nCTbW-1 (inclusive) and each y in the range 0 to nCbH-1 (inclusive) is derived as follows: The variables xL and yL are derived as follows: xL=palette_transpose_flag ? x*nSubHeight : x*nSubWidth (8-268) yL=palette_transpose_flag ? y*nSubWidth : y*nSubHeight (8-269) The variable bIsEscapeSample is derived as follows: · If PaletteIndexMap[xCb+xL][yCb+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then bIsEscapeSample is set equal to 1. Otherwise, bIsEscapeSample is set equal to 0. If bIsEscapeSample is equal to 0, the following applies: recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCb+xL][yCb+yL]] (8-270) Otherwise, if cu_transquant_bypass_flag is equal to 1, the following applies: recSamples[x][y]=PaletteEscapeVal[cIdx][xCb+xL][yCb+yL] (8-271) Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), the following ordered steps are applied:
[0178] 1. The quantization parameter qP is derived as follows: If cIdx is equal to 0, qP=Max(0,Qp'Y) (8-272) Otherwise, if cIdx is equal to 1, qP=Max(0,Qp'Cb) (8-273) Otherwise (cIdx equals 2), qP=Max(0,Qp'Cr) (8-274) 2. The variable bitDepth is derived as follows: bitDepth=(cIdx==0) ? BitDepth Y BitDepth C (8-275) 3. The list levelScale[] is specified as levelScale[k]={40,45,51,57,64,72}, where k=0..5. 4. The following applies: [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6 (8-276)]] {{T is set equal to (internal_bit_depth-input_bit_depth) for component cIdx. Nbits=max(T,(qP-4) / 6) If Nbits is equal to T, recSamples[x][y]=PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <Nbits Otherwise, recSamples[x][y]=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <Nbits)+(1<<(Nbits-1)}} [[recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal) (8-277)]]
[0179] The following conditions: ·cIdx is equal to 0 and numComps is equal to 1; cIdx is equal to 2 If either of the following is true, The variable PredictorPaletteSize[startComp] and the array PredictorPaletteEntries are derived or modified as follows: [Table 9] It is a bitstream conformance requirement that the value of PredictorPaletteSize[startComp] be in the range 0 to PaletteMaxPredictorSize inclusive.
[0180] 5.2 Embodiment #2 This embodiment describes palette index derivation. Palette coding semantics The variable adjustedRefPaletteIndex is derived as follows: [Table 10] If CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows: if(CurrPaletteIndex>=adjustedRefPaletteIndex) CurrPaletteIndex++]]
[0181] Binary conversion process for palette_idx_idc The inputs to this process are the binarization request for the syntax element palette_idx_idc and the variable MaxPaletteIndex. The output of this process is a binarization of the syntax elements. The variable cMax is derived as follows: · [[If this process is called for the first time for the current block,]]cMax is set equal to MaxPaletteIndex. [[Otherwise (this is not the first time this process has been called for the current block), cMax is set equal to MaxPaletteIndex minus 1.]] The binarization for palette_idx_idc is derived by invoking the TB binarization process specified in Section 9.3.3.4 on cMax.
[0182] 5.3 Embodiment #3 [Table 11]
[0183] 8.4.5.3 Decoding process for palette mode The inputs to this process are: Position (xCb, yCb) that specifies the top-left luma sample of the current block relative to the top-left luma sample of the current picture · startComp variable that specifies the first color component in the palette table The variable cIdx, which specifies the color component of the current block, Two variables nCbW and nCbH that specify the width and height of the current block, respectively. 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, y=0..nCbH-1.
[0184] Depending on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows: …… Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), the following ordered steps are applied:
[0185] 5. The quantization parameter qP is derived as follows: If cIdx is equal to 0, qP=Max(0,Qp'Y) (8-272) Otherwise, if cIdx is equal to 1, qP=Max(0,Qp'Cb) (8-273) Otherwise (cIdx equals 2), qP=Max(0,Qp'Cr) (8-274) 6. The variable bitDepth is derived as follows: bitDepth=(cIdx==0) ? BitDepth Y BitDepth C (8-275) 3. The list levelScale[] is specified as levelScale[k]={40,45,51,57,64,72}, where k=0..5. 4. The following applies: [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6 (8-276)]] {{shift=(max(QpPrimeTsMin,qP)-4) / 6 tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <shift)}} recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal) (8-277)
[0186] 5.4 Embodiment #4 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 cross scanning is used, or in the same position in the column to the left if vertical cross scanning is used. copy_above_palette_indices_flag equal to 0 specifies that an indication of the palette index of the sample is coded or inferred in the bitstream. …… The variable adjustedRefPaletteIndex is derived as follows: [Table 12] If CopyAboveIndicesFlag[xC][yC] is equal to 0, the variable CurrPaletteIndex is derived as follows: if(CurrPaletteIndex>=adjustedRefPaletteIndex) CurrPaletteIndex++ (7-158)
[0187] 5.5 Embodiment #5 [Table 13] 8.4.5.3 Decoding process for palette mode The inputs to this process are: Position (xCb, yCb) that specifies the top-left luma sample of the current block relative to the top-left luma sample of the current picture · startComp variable that specifies the first color component in the palette table The variable cIdx, which specifies the color component of the current block, Two variables nCbW and nCbH that specify the width and height of the current block, respectively. 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, y=0..nCbH-1.
[0188] Depending on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows: …… Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), the following ordered steps are applied:
[0189] 9. The quantization parameter qP is derived as follows: If cIdx is equal to 0, qP=Max(0,Qp'Y) (8-272) Otherwise, if cIdx is equal to 1, qP=Max(0,Qp'Cb) (8-273) Otherwise (cIdx equals 2), qP=Max(0,Qp'Cr) (8-274) 10. The variable bitDepth is derived as follows: bitDepth=(cIdx==0) ? BitDepth Y BitDepth C (8-275) 11. The list levelScale[] is specified as levelScale[k]={40,45,51,57,64,72}, where k=0..5. 12. The following applies: [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*levelScale[qP%6])<<(qP / 6)+32)>>6 (8-276)]] {{shift=min(bitDepth-1,(max(QpPrimeTsMin,qP)-4) / 6) tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]< <shift)}} recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal) (8-277)
[0190] 5.6 Embodiment #6 This embodiment shows a design for skipping transform shifts for transform skipping and is based on JVET-O2001-vE.
[0191] 8.7.2 Scaling and Transformation Processes The inputs to this process are: A luma position (xTbY, yTbY) that specifies the top-left sample of the current luma transform block relative to the top-left luma sample of the current picture. · Variable cIdx that specifies the color component of the current block Variable nTbW that specifies the conversion block width · Variable nTbH that specifies the transformation block height. The output of this process is a (nTbW) x (nTbH) array of residual samples, resSamples[x][y], where x=0..nTbW-1, y=0..nTbH-1. The variables bitDepth, bdShift, and tsShift are derived as follows: bitDepth=(cIdx==0) ? BitDepth Y BitDepth C (8-942) bdShift=Max(20-bitDepth,0) (8-943) [[tsShift=5+((Log2(nTbW)+Log2(nTbH)) / 2) (8-944) The variable codedCIdx is derived as follows: If cIdx is equal to 0 or TuCResMode[xTbY][yTbY] is equal to 0, codedCIdx is set equal to cIdx. Otherwise, if TuCResMode[xTbY][yTbY] is equal to 1 or 2, codedCIdx is set equal to 1. Otherwise, codedCIdx is set equal to 2. The variable cSign is set equal to (1-2*slice_joint_cbcr_sign_flag). The (nTbW) × (nTbH) array of residual samples, resSample, is derived as follows:
[0192] 1. The scaling process for transform coefficients specified in Section 8.7.3 is called with inputs the transform block position (xTbY, yTbY), the transform block width nTbW, the transform block height nTbH, the color component variable cIdx set equal to codedCIdx, and the current color component bit depth bitDepth, and the output is an (nTbW) by (nTbH) array of scaled transform coefficients d. 2. The (nTbW) × (nTbH) array of residual samples r is derived as follows: If transform_skip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, then for x=0..nTbW-1 and y=0..nTbH-1, the residual sample array values r[x][y] are derived as follows: r[x][y]=d[x][y]< <tsShift (8-945)]] [[Otherwise (transform_skip_flag[xTbY][yTbY] is equal to 0, or and cIdx is not equal to 0)]] The transform process for scaled transform coefficients specified in Section 8.7.4.1 is called with the transform block position (xTbY, yTbY), the transform block width nTbW and transform block height nTbH, the color component variable cIdx, and the (nTbW) × (nTbH) array of scaled transform coefficients d as input, and the output is a (nTbW) × (nTbH) array of residual samples r. 3. For x=0..nTbW-1 and y=0..nTbH-1, the intermediate residual samples res[x][y] are derived as follows: If transform_skip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, the following applies: res[x][y]=d[x][y]}} Otherwise (transform_skip_flag[xTbY][yTbY] is equal to 0, or and cIdx is not equal to 0), the following applies: res[x][y]=(r[x][y]+(1<<(bdShift-1)))>>bdShift (8-946) 4. For x=0..nTbW-1 and y=0..nTbH-1, the residual samples resSamples[x][y] are derived as follows: If cIdx is equal to codedCIdx, the following applies: resSamples[x][y]=res[x][y] (8-947) Otherwise, if TuCResMode[xTbY][yTbY] is equal to 2, the following applies: resSamples[x][y]=cSign*res[x][y] (8-948) Otherwise, the following applies: resSamples[x][y]=(cSign*res[x][y])>>1
[0193] 8.7.3 Scaling Process for Conversion Factors …… The variable rectNonTsFlag is derived as follows: rect[[NonTs]]Flag=(((Log2(nTbW)+Log2(nTbH))&1)==1[[&&]] (8-955) [[transform_skip_flag[xTbY][yTbY]=]]=0) The variables bdShift, rectNorm, and bdOffset are derived as follows: If transform_skip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, the following applies: bdShift=10}} ·{{Otherwise the following applies:}} bdShift=bitDepth+((rect[[NonTs]]Flag ? 1 : 0)+ (Log2(nTbW)+Log2(nTbH)) / 2)-5+dep_quant_enabled_flag (8-956) dOffset=(1<<bdShift)> >1 (8-957) The list levelScale[][] is specified as levelScale[j][k]={{40,45,51,57,64,72},{57,64,72,80,90,102}, where j=0..1 and k=0..5. The (nTbW)×(nTbH) array dz is set equal to the (nTbW)×(nTbH) array TransCoeffLevel[xTbY][yTbY][cIdx]. For the derivation of the scaled transform coefficients d[x][y], where x=0..nTbW-1 and y=0..nTbH-1, the following applies: The intermediate scaling factor m[x][y] is derived as follows: · m[x][y] is set equal to 16 if one or more of the following conditions are true: sps_scaling_list_enabled_flag is equal to 0. transform_skip_flag[xTbY][yTbY] is equal to 1. Otherwise, the following applies: m[x][y]=ScalingFactor[Log2(nTbW)][Log2(nTbH)][matrixId][x][y] where matrixId is specified in Table 7 (8-958) The scaling factors ls[x][y] are derived as follows: If dep_quant_enabled_flag is equal to 1, the following applies: ls[x][y]=(m[x][y]*levelScale[rect[[NonTs]]Flag][(qP+1)%6])<<((qP+1) / 6) (8-960) Otherwise (dep_quant_enabled_flag is equal to 0), the following applies: ls[x][y]=(m[x][y]*levelScale[rect[[NonTs]]Flag][qP%6])<<(qP / 6) (8-961) If BdpcmFlag[xTbY][yYbY] is equal to 1, dz[x][y] is modified as follows: If BdpcmDir[xTbY][yYbY] is equal to 0 and x is greater than 0, the following applies: dz[x][y]=Clip3(CoeffMin,CoeffMax,dz[x-1][y]+dz[x][y]) (8-961) Otherwise, if BdpcmDir[xTbY][yYbY] is equal to 1 and y is greater than 0, the following applies: dz[x][y]=Clip3(CoeffMin,CoeffMax,dz[x][y-1]+dz[x][y]) (8-962) The value dnc[x][y] is derived as follows: dnc[x][y]=(dz[x][y]*ls[x][y]+bdOffset)>>bdShift (8-963) The scaled transformation coefficients d[x][y] are derived as follows: d[x][y]=Clip3(CoeffMin,CoeffMax,dnc[x][y]) (8-964)
[0194] 5.7 Embodiment #7 This embodiment shows a design for signaling the number of palette indices.
[0195] 7.3.8.6 Palette Coding Syntax [Table 14] TIFF2026016570000025.tif73170num_palette_indices{{_diff}}[[_minus1]] plus [[1]]({{MaxPaletteIndex+1}}) is the number of palette indices explicitly signaled or inferred for the current block. {{NumPaletteIndices is set to (num_palette_indices_diff+MaxPaletteIndex+1).}} If num_palette_indices{{_diff}}[[_minus1]] is not present, it is inferred to be equal to 0. {{The value of num_palette_indices_diff must be in the range from 0 to cbWidth*cbHeight-(MaxPaletteIndex+1) (inclusive).}} copy_above_indices_for_final_run_flag equal to 1 specifies that the palette indices for the last positions in a coding unit are copied from the palette indices in the row above if a horizontal cross scan is used, or from the palette indices in the column to the left if a vertical cross scan is used. copy_above_indices_for_final_run_flag equal to 0 specifies that the palette indices for the last positions in the coding unit are copied from PaletteIndexIdc[[[num_palette_indices_minus1]]{{NumPaletteIndices-1}}].
[0196] 9.5.3.13 Binarization process for num_palette_indices{{_diff}}[[_minus1]] The input to this process is the binarization request for the syntax element num_palette_indices{{_diff}}[[_minus1]] and MaxPaletteIndex. The output of this process is a binarization of the syntax elements. The variable cRiceParam is derived as follows: cRiceParam=3+((MaxPaletteIndex+1)>>3) (9-26) The variable cMax is derived from cRiceParam as follows: cMax=4< <cRiceParam (9-27) The binarization of the syntax element num_palette_indices{{_diff}}[[_minus1]] is the concatenation of the prefix bin string and (if present) the suffix bin string. For the derivation of the prefix bin string, the following applies: The prefix value prefixVal of num_palette_indices{{_diff}}[[_minus1]] is derived as follows: prefixVal=Min(cMax,num_palette_indices{{_diff}}[[_minus1]]) (9-28) The prefix bin string is specified by invoking the TR binarization process specified in Section 9.3.3.3 on prefixVal with the variables cMax and cRiceParam as input. If the prefix bin string is equal to a bit string of length 4 with all bits equal to 1, then there exists a suffix bin string, which is derived as follows: The suffix value suffixVal of num_palette_indices{{_diff}}[[_minus1]] is derived as follows: suffixVal=num_palette_indices{{_diff}}[[_minus1]]-cMax (9-29) The suffix bin string is specified by invoking the kth order EGk binarization process specified in Section 9.3.3.5 for binarizing suffixVal with the Exponential-Golomb order k equal to cRiceParam+1. [Table 15]
[0197] 5.8 Embodiment #8 This embodiment shows the design of interleaved signaling in line-based CG palette mode. This embodiment is based on the draft provided in JVET-P2001-v4. [Table 16] TIFF2026016570000028.tif203170 TIFF2026016570000029.tif209170 TIFF2026016570000030.tif226170
[0198] 5.9 Embodiment #9 Modifications are based on JVET-P2001-vE.
[0199] 8.4.5.3 Decoding process for palette mode The inputs to this process are: Position (xCbComp, yCbComp) that specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture The variable treeType specifies whether a single tree or a dual tree is used. If a dual tree is used, this specifies whether the current tree corresponds to the luma or chroma component. The variable cIdx, which specifies the color component of the current block, Two variables nCbW and nCbH that specify the width and height of the current coding block, respectively. The output of this process is an array recSamples[x][y], where x=0..nCbW-1, y=0..nCbH-1, specifying the reconstructed sample values for the block.
[0200] Depending on the value of treeType, the variables startComp and numComps are derived as follows: If treeType is equal to SINGLE_TREE: startComp=0 (444) numComps=3 (445) Otherwise, treeType is equal to DUAL_TREE_LUMA: startComp=0 (446) numComps=1 (447) Otherwise, treeType is equal to DUAL_TREE_CHROMA: startComp=1 (448) numComps=2 (449)
[0201] Depending on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows: If cIdx is greater than 0 and startComp is equal to 0, nSubWidth is set to SubWidthC and nSubHeight is set to SubHeightC. Otherwise, nSubWidth is set to 1 and nSubHeight is set to 1. A (nCbW × nCbH) block of the reconstructed sample array recSamples at location (xCbComp, yCbComp) is represented by recSamples[x][y], where x=0..nCTbW-1 and y=0..nCbH-1, and the value of recSamples[x][y] for each x in the range 0 to nCTbW-1 (inclusive) and each y in the range 0 to nCbH-1 (inclusive) is derived as follows: The variables xL, yL, xCbL, and yCbL are derived as follows: xL=x*nSubWidth (450) yL=y*nSubHeight (451) xCbL=xCbComp*nSubWidth (452) yCbL=yCbComp*nSubHeight (453) The variable bIsEscapeSample is derived as follows: · If PaletteIndexMap[xCbL+xL][yCbL+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then bIsEscapeSample is set equal to 1.
[0202] Otherwise, bIsEscapeSample is set to 0. If bIsEscapeSample is equal to 0, the following applies: recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCbL+xL][yCbL+yL]] (454) Otherwise (bIsEscapeSample equals 1), the following ordered steps are applied: 1. The quantization parameter qP is derived as follows: If cIdx is equal to 0, qP=Max(QpPrimeTsMin,Qp'Y) (455) Otherwise, if cIdx is equal to 1, qP=Max(QpPrimeTsMin,Qp'Cb) (456) Otherwise (cIdx is equal to 2), qP=Max(QpPrimeTsMin,Qp'Cr) (457) 2. The list levelScale[] is specified as levelScale[k]={40,45,51,57,64,72} for k=0..5. 3. The following applies: {{shift=Min(bitDepth-1,(QpPrimeTsMin-4) / 6)}} [[tmpVal=(PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]* levelScale[qP%6])<<(qP / 6)+32)>>6 (458)]] {{tmpVal=((PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]< <shift)* levelScale[(qP-QpPrimeTsMin+4)%6])<<((qP-QpPrimeTsMin+4) / 6)+32)>>6 (458)}} recSamples[x][y]=Clip3(0,(1< <BitDepth)-1,tmpVal) (459)
[0203] 5.10 Embodiment #10 Modifications are based on JVET-P2001-vE.
[0204] 8.4.5.3 Decoding process for palette mode The inputs to this process are: Position (xCbComp, yCbComp) that specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture The variable treeType specifies whether a single tree or a dual tree is used. If a dual tree is used, this specifies whether the current tree corresponds to the luma or chroma component. The variable cIdx, which specifies the color component of the current block, Two variables nCbW and nCbH that specify the width and height of the current coding block, respectively. The output of this process is an array recSamples[x][y], where x=0..nCbW-1, y=0..nCbH-1, specifying the reconstructed sample values for the block.
[0205] Depending on the value of treeType, the variables startComp and numComps are derived as follows: If treeType is equal to SINGLE_TREE: startComp=0 (444) numComps=3 (445) Otherwise, treeType is equal to DUAL_TREE_LUMA: startComp=0 (446) numComps=1 (447) Otherwise, treeType is equal to DUAL_TREE_CHROMA: startComp=1 (448) numComps=2 (449)
[0206] Depending on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows: If cIdx is greater than 0 and startComp is equal to 0, nSubWidth is set to SubWidthC and nSubHeight is set to SubHeightC. Otherwise, nSubWidth is set to 1 and nSubHeight is set to 1. A (nCbW × nCbH) block of the reconstructed sample array recSamples at location (xCbComp, yCbComp) is represented by recSamples[x][y], where x=0..nCTbW-1 and y=0..nCbH-1, and the value of recSamples[x][y] for each x in the range 0 to nCTbW-1 (inclusive) and each y in the range 0 to nCbH-1 (inclusive) is derived as follows: The variables xL, yL, xCbL, and yCbL are derived as follows: xL=x*nSubWidth (450) yL=y*nSubHeight (451) xCbL=xCbComp*nSubWidth (452) yCbL=yCbComp*nSubHeight (453) The variable bIsEscapeSample is derived as follows: · If PaletteIndexMap[xCbL+xL][yCbL+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then bIsEscapeSample is set equal to 1.
[0207] Otherwise, bIsEscapeSample is set to 0. If bIsEscapeSample is equal to 0, the following applies: recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCbL+xL][yCbL+yL]] (454) Otherwise (bIsEscapeSample equals 1), the following ordered steps are applied:
[0208] 4. The quantization parameter qP is derived as follows: If cIdx is equal to 0, qP=Max(QpPrimeTsMin,Qp'Y) (455) Otherwise, if cIdx is equal to 1, qP=Max(QpPrimeTsMin,Qp'Cb) (456) Otherwise (cIdx is equal to 2), qP=Max(QpPrimeTsMin,Qp'Cr) (457) 5. The list levelScale[] is specified as levelScale[k] = {40, 45, 51, 57, 64, 72} for k = 0..5. 6. The following applies: {{shift=Min(bitDepth-1,(QpPrimeTsMin-4) / 6)}} [[tmpVal=(PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]* levelScale[qP%6])<<(qP / 6)+32)>>6 (458)]] {{qP'=Max(0,qP-6*shift) tmpVal=((PaletteEscapeVal[cIdx][xCbL+xL][yCbL+yL]< <shift)* levelScale[qP'%6])<<(qP' / 6)+32)>>6 (458)}} recSamples[x][y]=Clip3(0,(1< <BitDepth)-1,tmpVal) (459)
[0209] FIG. 9 is a block diagram of a video processing device 900. The device 900 may be used to implement one or more of the methods described herein. The device 900 may be embodied in a smartphone, a tablet, a computer, an Internet of Things (IoT) receiver, etc. The device 900 may include one or more processors 902, one or more memories 904, and video processing hardware 906. The processor 902 may be configured to implement one or more methods described herein. The memory(s) 904 may be used to store data and code used to implement the methods and techniques described herein. The video processing hardware 906 may be used to implement some of the techniques described herein in a hardware circuit. In some embodiments, the hardware 906 may be at least partially internal to the processor 902, e.g., a graphics coprocessor.
[0210] Some embodiments of the disclosed techniques include making a judgment or decision to enable a video processing tool or mode. In one example, if a video processing tool or mode is enabled, an encoder uses or implements the tool or mode in processing blocks of video, but may not necessarily modify the resulting bitstream based on the use of the tool or mode. That is, conversion of blocks of video to a bitstream representation of video uses the video processing tool or mode when enabled based on the judgment or decision. In another example, if a video processing tool or mode is enabled, a decoder processes the bitstream with the knowledge that the bitstream has been modified based on the video processing tool or mode. That is, conversion of a bitstream representation of video to blocks of video is performed using the video processing tool or mode that was enabled based on the judgment or decision.
[0211] Some embodiments of the disclosed techniques include making a judgment or decision to disable a video processing tool or mode. In one example, when a video processing tool or mode is disabled, an encoder does not use that tool or mode when converting blocks of video to a bitstream representation of video. In another example, when a video processing tool or mode is disabled, a decoder processes the bitstream with the knowledge that the bitstream has not been modified using the video processing tool or mode that was enabled based on the judgment or decision.
[0212] FIG. 10 is a block diagram illustrating an example video processing system 1000 in which various techniques disclosed herein may be implemented. Various implementations 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, e.g., in the form of 8- or 10-bit multi-component pixel values, or in 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, passive optical networks (PONs), and wireless interfaces such as Wi-Fi or cellular interfaces.
[0213] System 1000 may include a coding component 1004 that may implement various coding or encoding methods described herein. Coding component 1004 may reduce the average bitrate of video from input 1002 to the output of coding component 1004 to generate a coded representation of the video. Thus, coding techniques are sometimes referred to as video compression or video transcoding techniques. The output of coding component 1004 may be stored or transmitted via a communication connection as represented by component 1006. The stored or communicated bitstream (or coded) representation of the video received at input 1002 may be used by component 1008 to generate pixel values or displayable video sent to display interface 1010. The process of generating user-viewable video from the bitstream representation is sometimes referred to as video decompression. Furthermore, while certain video processing operations are referred to as “coding” operations or tools, it will be understood that the coding tools or operations are used in an encoder and corresponding decoding tools or operations that reverse the results of the coding are performed in a decoder.
[0214] Examples of peripheral bus interfaces or display interfaces include Universal Serial Bus (USB) or High-Definition Multimedia Interface (MDMI) or DisplayPort, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interface, etc. The techniques described herein may be embodied in various electronic devices such as mobile phones, laptops, smartphones, or other devices capable of performing digital data processing and / or video display.
[0215] FIG. 11 is a block diagram illustrating an example video coding system 100 that can utilize the technique tables of this disclosure.
[0216] 11, video coding system 100 may include source device 110 and destination device 120. Source device 110, which may be referred to as a video encoding device, generates encoded video data. Destination device 120, which may be referred to as a video decoding device, decodes the encoded video data generated by source device 110.
[0217] The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface .
[0218] 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 may include one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a sequence of bits forming a coded representation of the video data. The bitstream may include coded pictures and associated data. A coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. The I / O interface 116 may include a modulator / demodulator (modem) and / or transmitter. The encoded video data may be transmitted directly to the destination device 120 via the I / O interface 116 over the network 130a. The encoded video data may also be stored on a storage medium / server 130b for access by the destination device 120.
[0219] The destination device 120 may include an I / O interface 126 , a video decoder 124 , and a display device 122 .
[0220] I / O interface 126 may include a receiver and / or a modem. I / O interface 126 may obtain encoded video data from source device 110 or storage medium / server 130b. Video decoder 124 may decode the encoded video data. Display device 122 may display the decoded video data to a user. Display device 122 may be integrated with destination device 120 or may be external to destination device 120 configured to interface with an external display device.
[0221] 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 (VVC) standard, and other current and / or additional standards.
[0222] FIG. 12 is a block diagram illustrating an example of a video encoder 200, which may be the video encoder 114 in the system 100 shown in FIG.
[0223] Video encoder 200 may be configured to perform any or all of the techniques of this disclosure. In the example of FIG. 12, video encoder 200 includes multiple functional components. The techniques described in this disclosure may be shared among various components of video encoder 200. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.
[0224] Functional components of the video encoder 200 may include a splitter 201, a predictor 202 which may include a mode selector 203, a motion estimator 204, a motion compensation unit 205, and an intra predictor 206, a residual generator 207, a transformer 208, a quantizer 209, an inverse quantizer 210, an inverse transformer 211, a reconstruction unit 212, a buffer 213, and an entropy encoding unit 214.
[0225] In other examples, video encoder 200 may include more, fewer, or different functional components. In one example, prediction unit 202 may include an intra block copy (IBC) unit. The IBC unit can perform prediction in an IBC mode, where at least one reference picture is the picture in which the current video block is located.
[0226] Furthermore, some components, such as the motion estimator 204 and the motion compensator 205, may be highly integrated, but are depicted separately in the example of FIG. 12 for illustrative purposes.
[0227] The divider 201 can partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 can support a variety of video block sizes.
[0228] The mode selector 203 may select one of the coding modes, intra or inter, based on, for example, an error result, and provide the resulting intra- or inter-coded block to a residual generator 207, which generates residual block data, and to a reconstruction unit 212, which reconstructs encoded blocks for use as reference pictures. In some examples, the mode selector 203 may select a combined intra- and inter-prediction (CIIP) mode, in which prediction is based on an inter-prediction signal and an intra-prediction signal. The mode selector 203 may also select the resolution of the motion vector for the block (e.g., sub-pixel or integer-pixel precision) in the case of inter-prediction.
[0229] To perform inter prediction on the current video block, motion estimation unit 204 may generate motion information for the current video block by comparing one or more reference frames from buffer 213 to the current video block. Motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from buffer 213 other than the picture associated with the current video block.
[0230] Motion estimation unit 204 and motion compensation unit 205 may perform different operations on the current video block depending on, for example, whether the current video block is in an I slice, a P slice, or a B slice.
[0231] In some examples, the motion estimation unit 204 may perform unidirectional prediction for the current video block, and the motion estimation unit 204 may search reference pictures in list 0 or list 1 for a reference video block for the current video block. The motion estimation unit 204 may then generate a reference index indicating a reference picture in list 0 or list 1 that contains the reference video block, and a motion vector indicating a 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 motion information for the current video block. The motion compensation unit 205 may generate a predicted video block for the current block based on the reference video block indicated by the motion information for the current video block.
[0232] In another example, motion estimator 204 may perform bidirectional prediction for the current video block, and motion estimator 204 may search reference pictures in list 0 for a reference video block for the current video block and may also search reference pictures in list 1 for another reference video block for the current video block. Motion estimator 204 may then generate reference indexes that indicate the reference pictures in lists 0 and 1 that contain the reference video blocks, and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. Motion estimator 204 may output the reference index and the motion vector for the current video block as motion information for the current video block. Motion compensation unit 205 may generate a predictive video block for the current video block based on the reference video block indicated by the motion information for the current video block.
[0233] In some examples, the motion estimator 204 may output a full set of motion information for the decoder's decoding process.
[0234] In some examples, motion estimator 204 may not output a full set of motion information for the current video. Rather, motion estimator 204 may signal motion information for the current video block by reference to motion information for another video block. For example, motion estimator 204 may determine that the motion information for the current video block is sufficiently similar to the motion information of a neighboring video block.
[0235] In one example, motion estimator 204 may indicate, in a syntax structure associated with a current video block, a value that indicates to video decoder 300 that the current video block has the same motion information as another video block.
[0236] In another example, motion estimation unit 204 may identify 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. Video decoder 300 can use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.
[0237] As mentioned above, video encoder 200 may predictively signal motion vectors. Two examples of predictive signaling techniques that may be implemented by video encoder 200 include advanced motion vector prediction (AMVP) and merge mode signaling.
[0238] The intra predictor 206 may perform intra prediction on the current video block. When the intra predictor 206 performs intra prediction on the current video block, the intra predictor 206 may generate predictive data for the current video block based on decoded samples of other video blocks within the same picture. The predictive data for the current video block may include the video block to be predicted and various syntax elements.
[0239] Residual generator 207 may generate residual data for the current video block by subtracting (e.g., as indicated by a minus sign) the prediction video block for the current video block from the current video block. The residual data for the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.
[0240] In other examples, for example, in skip mode, residual data for the current video block may not exist, and residual generator 207 may not perform the subtraction operation.
[0241] Transform processor 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.
[0242] After the transform processor 208 generates the transform coefficient video block associated with the current video block, the quantizer 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.
[0243] An inverse quantization unit 210 and an inverse transform unit 211 may apply inverse quantization and inverse transform, respectively, to the transform coefficient video block to reconstruct a residual video block from the transform coefficient video block. A reconstruction unit 212 adds the reconstructed residual video block to corresponding samples from one or more prediction video blocks generated by the prediction unit 202 to generate a reconstructed video block related to the current block for storage in a buffer 213.
[0244] After the reconstructor 212 reconstructs the video blocks, a loop filtering operation may be performed to reduce video blocking artifacts within the video blocks.
[0245] The entropy encoding unit 214 may receive data from other functional components of the video encoder 200. Once the entropy encoding unit 214 receives the data, the entropy encoding unit 214 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream including the entropy encoded data.
[0246] FIG. 13 is a block diagram illustrating an example of a video decoder 300, which may be the video decoder 114 in the system 100 shown in FIG.
[0247] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. In the example of FIG. 13, video decoder 300 includes multiple functional components. The techniques described in this disclosure may be shared among various components of video decoder 300. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.
[0248] 13, video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306, and a buffer 307. Video decoder 300 may, in some examples, perform a decoding pass that is generally the reverse of the encoding pass described with respect to video encoder 200 (FIG. 12).
[0249] The entropy decoding unit 301 may retrieve an encoded bitstream. The encoded bitstream may include entropy-coded video data (e.g., encoded blocks of video data). The entropy decoding unit 301 may decode the entropy-coded video data, and from the entropy-decoded video data, the motion compensation unit 302 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 may determine such information by, for example, implementing AMVP and merge mode.
[0250] The motion compensation unit 302 may perform interpolation, possibly based on an interpolation filter, to generate a motion-compensated block. An identifier for the interpolation filter used with sub-pixel accuracy may be included in the syntax element.
[0251] The motion compensation unit 302 may calculate interpolated values for sub-integer pixels of the reference block using an interpolation filter used by video encoder 200 during encoding of the video block. The motion compensation unit 302 may determine the interpolation filter used by video encoder 200 according to the received syntax information and generate the prediction block using the interpolation filter.
[0252] The motion compensation unit 302 may use some of the syntax information to determine the size of the blocks used to encode the frames and / or slices of the encoded video sequence, partitioning information describing how each macroblock of a picture of the encoded video sequence is partitioned, a mode indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-coded block, and other information for decoding the encoded video sequence.
[0253] The intra predictor 303 may form a prediction block from spatially adjacent blocks, for example, using an intra prediction mode received in the bitstream. The inverse quantizer 303 inverse quantizes, i.e., dequantizes, the quantized video block coefficients provided in the bitstream and decoded by the entropy decoder 301. The inverse transformer 303 applies an inverse transform.
[0254] The reconstruction unit 306 may add the residual blocks with the corresponding prediction blocks generated by the motion compensation unit 202 or intra prediction unit 303 to form decoded blocks. If desired, a deblocking filter may also be applied to filter the decoded blocks to remove blockiness artifacts. The decoded video blocks are then stored in a buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction and also generates decoded video for presentation on a display device.
[0255] In some embodiments, the following methods are based on the list of examples and embodiments recited above. In one example, these methods can be implemented using, but are not limited to, the implementations shown in Figures 9-13.
[0256] 14 is a flowchart of an example method for video processing. As shown therein, method 1400 includes performing 1410 a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules where the current video block is coded using a palette mode coding tool, where binarization of escape symbols for the current video block uses Exponential-Golomb (EG) codes of order K, where K is a non-negative integer not equal to 3, where the palette mode coding tool represents the current video block using a palette of representative color values, and where the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0257] 15 is a flowchart of an example method for video processing. As shown therein, method 1500 includes performing 1510 a conversion between a video including one or more video regions including one or more video blocks and a bitstream representation of the video, the bitstream representation conforming to a format rule where a current video block of the one or more video blocks is coded using a palette mode coding tool, and binarization of escape symbols for the current video block uses fixed-length binarization, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without the representative color values. 16 is a flowchart of an example method for video processing. As shown therein, method 1600 includes performing 1610 a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules where the current video block is coded using a palette mode coding tool, where binarization of escape symbols of the current video block uses variable length coding, where the palette mode coding tool represents the current video block using a palette of representative color values, and where the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0258] 17 is a flowchart of an example method for video processing. As shown therein, method 1700 includes performing (1710) a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, the conversion including application of a quantization or inverse quantization process to the current video block, the bitstream representation conforming to format rules that configure the application of the quantization or inverse quantization process based on whether the current video block is coded using a palette mode coding tool, the palette mode coding tool representing the current video block using a palette of representative color values.
[0259] 18 is a flowchart of an example method for video processing. As shown therein, the method 1800 includes performing 1810 a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, where the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented such that escape symbols of the current video block are quantized and / or dequantized using binary shift operations, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block coded without using the representative color values.
[0260] 19 is a flowchart of an example method for video processing. As shown therein, the method 1900 includes performing 1910 a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules where the current video block is coded using a palette mode coding tool, where one or more palette indices of the palette mode coding tool are coded without reference indices, and where the palette mode coding tool represents the current video block using a palette of representative color values.
[0261] 20 is a flowchart of an example method for video processing. As shown therein, the method 2000 includes performing (2010) a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, the bitstream representation conforming to format rules that constrain the derivation between indices of escape symbols and indices of non-escaped symbols, where the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0262] 21 is a flowchart of an example method for video processing. As shown therein, the method 2100 includes performing 2110 a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules where the current video block is coded using a palette mode coding tool, where a derived palette index of the palette mode coding tool has a maximum value, and where the palette mode coding tool represents the current video block using a palette of representative color values.
[0263] 22 is a flowchart of an example method for video processing. As shown therein, the method 2200 includes performing (2210) 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 conforms to format rules where a current video block coded using a palette mode coding tool is represented using syntax elements including escape symbols, values of indexes indicating the escape symbols are unchanged for each of the one or more video regions, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block coded without the representative color values.
[0264] 23 is a flowchart of an example method for video processing. As shown therein, the method 2300 includes performing 2310 a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules in which a current video block coded using a palette mode coding tool is represented using syntax elements coded based on a current index and a reference index, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0265] 24 is a flowchart of an example method for video processing. As shown therein, method 2400 includes performing 2410 a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to formatting rules where a current video block coded using a palette mode coding tool is expressed using syntax elements that include predictively coded escape symbols, where the palette mode coding tool represents the current video block using a palette of representative color values, and where the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0266] 25 is a flowchart of an example method for video processing. As shown therein, method 2500 includes performing 2510 a conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, where the bitstream representation conforms to a format rule where the current video block coded using a palette mode coding tool is represented using syntax elements that are run-length coded in a context based on a palette index for indexing palette items, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0267] 26 is a flowchart of an example method for video processing. As shown therein, the method 2600 includes performing 2610 a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element that includes a current palette index that is signaled independently of previous palette indexes, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0268] 27 is a flowchart of an example method for video processing. As shown therein, method 2700 includes determining (2710) a first neighboring video block to be used to predict a quantization parameter for a current video block of one or more video regions of a video based on an ordering rule and a second neighboring video block to be used to predictively determine a coding mode for the current video block, and performing (2720) a conversion between the video and a bitstream representation of the video based on the determination.
[0269] 28 is a flowchart of an example method for video processing. As shown therein, the method 2800 includes performing 2810 a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element that includes a block-level quantization parameter (QP) difference regardless of whether the current video block includes an escape symbol, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbol is used for samples of the current video block that are coded without using the representative color values.
[0270] 29 is a flowchart of an example method for video processing. As shown therein, the method 2900 includes performing 2910 a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to a format rule where a current video block coded using a palette mode coding tool is represented using a syntax element that includes one or more coding block flags (CBFs) for the palette block, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0271] 30 is a flowchart of an example method for video processing. As shown therein, the method 3000 includes performing (3010) a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules where a current video block coded using a palette mode coding tool is expressed using a syntax element that includes one or more palette indices, the number of the one or more palette indices (NumPltIdx) being greater than or equal to K, where the palette mode coding tool represents the current video block using a palette of representative color values, and K is a positive integer.
[0272] 31 is a flowchart of an example method for video processing. As shown therein, the method 3100 includes performing (3110) a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules where a current video block to be coded using a palette mode coding tool is represented using syntax elements based on a maximum size of a palette for the current block, a size of the current video block, use of a lossless mode, or a quantization parameter (QP), and the palette mode coding tool represents the current video block using a palette of representative color values.
[0273] 32 is a flowchart of an example method for video processing. As shown therein, method 3200 includes, for conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, determining (3210) that a current video block is coded in a block-based differential pulse code modulation (BDPCM) mode and divided into multiple transform blocks or sub-blocks, and, as part of performing the conversion, performing (3220) residual prediction at the block level and including one or more residuals in the bitstream representation at the sub-block or transform block level based on the determination.
[0274] 33 is a flowchart of an example method for video processing. As shown therein, the method 3300 includes performing (3310) a conversion between a video including one or more video regions that include a current video block and a bitstream representation of the video, where the bitstream representation conforms to format rules where the current video block is coded using a line-based coefficient group (CG) palette mode, where the line-based CG palette mode uses a palette of representative color values to represent multiple segments of each coding unit (CU) of the current video block.
[0275] The following solutions may be implemented as preferred features of some embodiments, along with additional techniques described in the items listed in the previous section (e.g., item 1).
[0276] 1. A method of video processing, 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 conforms to format rules whereby the current video block is coded using a palette mode coding tool, wherein binarization of escape symbols for the current video block uses Exponential-Golomb (EG) codes of order K, where K is a non-negative integer not equal to 3, wherein the palette mode coding tool represents the current video block using a palette of representative color values, and wherein the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0277] 2. Solution 1 method, where K=0.
[0278] 3. Solution 1 method, where K=1.
[0279] 4. Solution 1 method, where K=2.
[0280] 1. A method of video processing, comprising: performing a conversion between a video including one or more video regions each including one or more video blocks; and a bitstream representation of the video, wherein the bitstream representation conforms to a format rule where a current video block of the one or more video blocks is coded using a palette mode coding tool and binarization of escape symbols for the current video block uses fixed-length binarization; the palette mode coding tool represents the current video block using a palette of representative color values; and the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0281] 6. The method of Solution 5, wherein the fixed-length binarization uses N bits, where N is an integer greater than 1.
[0282] 7. Solution 6 method, where N is based on the internal bit depth.
[0283] 8. The method of Solution 6, wherein the value of N is signaled in slice subpictures, tiles, pictures, or videos.
[0284] 9. Solution 6 method, where N is based on the quantization parameter.
[0285] 10. The method of solution 9, where N is based on a function (f()) of the quantization parameter (Qp), denoted as f(Qp).
[0286] 11. Solution 9 method where N is set to (ibd-max(16,(Qp-4) / 6)), where ibd is the internal bit depth.
[0287] 12. Solution 9 method, where N is set to (ibd-max(QpPrimeTsMin,(Qp-4) / 6)), where ibd is the internal bit depth and QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode.
[0288] 13. Solution 9 method, where N is set to max(A,(ibd-max(16,(QpPrimeTsMin-4) / 6))), where ibd is the internal bit depth, QpPrimeTsMin is the minimum allowed quantization parameter for transform skip mode, and A is a non-negative integer.
[0289] 14. Solution 13 method where A=0 or A=1.
[0290] 15. The method of any one of Solutions 9 to 14, wherein the quantization parameter is the sum of a quantization parameter for a slice of the video and a constant value, the constant value being an integer value.
[0291] 16. A method of video processing, 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 conforms to format rules whereby the current video block is coded using a palette mode coding tool, wherein binarization of escape symbols of the current video block uses variable length coding, wherein the palette mode coding tool represents the current video block using a palette of representative color values, and wherein the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0292] 17. The method of Solution 16, wherein said variable length coding excludes exponential-Golomb codes of degree 3.
[0293] 18. The method of Solution 16, wherein the variable length coding is a truncated binary (TB) code with an input parameter K, where K is an integer.
[0294] 19. The method of Solution 18, wherein K is based on (a) a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a tile group header, a largest coding unit (LCU) row, a group of LCUs, 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) dimensions of a current video block, (f) a current quantization parameter of the current video block, (g) an indication of a color format of the video, (h) a coding tree structure, or (i) a color component of the video.
[0295] 20. The method of Solution 5, wherein multiple values of the escape symbol are signaled using multiple binarization methods.
[0296] 21. A method of video processing, 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 comprises application of a quantization or inverse quantization process to the current video block, the bitstream representation conforming to format rules that configure the application of the quantization or inverse quantization process based on whether the current video block is coded using a palette mode coding tool, the palette mode coding tool representing the current video block using a palette of representative color values.
[0297] 1. A method of video processing, 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 conforms to a format rule whereby a current video block to be coded using a palette mode coding tool is represented such that escape symbols of the current video block are quantized and / or dequantized using binary shift operations, wherein the palette mode coding tool represents the current video block using a palette of representative color values, and wherein the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0298] 23. The method of solution 22, wherein said quantization corresponds to a right bit shift.
[0299] 24. The method of Solution 22, wherein the escape symbol is coded as f(p, Qp), where f() is a function, p is an input symbol value, and Qp is a derived quantization parameter for the corresponding color component representing the current video block.
[0300] 25. Solution 24 method, where f is defined as p>>g(Qp).
[0301] 26. Solution 24 method where f is defined as (p+(1<<(g(QP)-1)))>>g(Qp).
[0302] 27.f is clip(0,(1< <bd)-1,(p+(1<<(g(QP)-1)))> >g(Qp)), where clip(x,min,max) is the clipping function and x,min,max are integers. Solution 24.
[0303] 28. The method of solution 22, in which the escape symbol is coded as h(p), where h() is a function and p is an input value symbol.
[0304] 29. Solution 28 method where h is defined as p>>N, where N is a non-negative integer.
[0305] 30. Solution 28, where h is defined as (p+(1<<(N-1)))>>N, where N is a non-negative integer.
[0306] 31. Solution 29 or 30, where N=0 when cu_transquant_bypass_flag=1.
[0307] 32. When cu_transquant_bypass_flag=1, N=(bd-ibd), where bd is the internal bit depth and ibd is the input bit depth. Solution 29 or 30.
[0308] 33.h is defined as clip(0,(1<<(bd-N)-1,p>>N), where bd is the internal bit depth of the current color component of the current video block, N is a non-negative integer, and clip(x,min,max) is the clipping function, where x, min, and max are integers. Solution 28 method.
[0309] 34.h is defined as clip(0,(1<<(bd-N)-1,(p+(1<<(N-1)))>>N), where bd is the internal bit depth for the current color component of the current video block, N is a non-negative integer, clip(x,min,max) is a clipping function, and x, min, and max are integers, the method of Solution 28.
[0310] 35. The method of any one of Solutions 29 to 34, where N is within the range of [0,(bd-1)] and bd is the internal bit depth for the current color component of the current video block.
[0311] 36. The method of Solution 22, where the dequantization corresponds to a left bit shift.
[0312] 37. The method of Solution 36, where the escape symbol is dequantized as f(p,Qp), where f() is a function, p is the decoded escape symbol, and Qp is the derived quantization parameter for the corresponding color component representing the current video block.
[0313] 38. The method of Solution 37, where f is defined as p<<g(Qp).
[0314] 39. The method of Solution 36, where the escape symbol is reconstructed as f(p,Qp), where f() is a function, p is the decoded escape symbol, and Qp is the derived quantization parameter for the corresponding color component representing the current video block.
[0315] 40. The method of Solution 39, where f is defined as clip(0,(1<<bd)-1,p<<g(Qp)), bd is the internal bit depth for the current color component of the current video block, clip(x,min,max) is a clipping function, and x, min, and max are integers.
[0316] 41. The clipping function clip(x,min,max) is
Number
[0317] 42. The escape symbol is reconstructed as h(p), where h() is a function and p is the decoded escape symbol, the method of Solution 36.
[0318] 43. h is defined as p << N, where N is a non - negative integer, the method of Solution 42.
[0319] 44. When cu_transquant_bypass_flag = 1, N = 0, the method of Solution 42 or 43.
[0320] 45. When cu_transquant_bypass_flag = 1, N=(bd - ibd), where bd is the internal bit depth and ibd is the input bit depth, the method of Solution 42 or 43.
[0321] 46. N=(max(QpPrimeTsMin, qP)-4) / 6, where qP is the decoded quantization parameter and QpPrimeTsMin is the minimum allowable quantization parameter for the transform skip mode, the method of Solution 42 or 43.
[0322] 47. N is further clipped as min(bd - 1, N), where bd is the internal bit depth for the current color component of the current video block, the method of any one of Solutions 43 to 46.
[0323] 48. N is within the range of [0, (bd - 1)], where bd is the internal bit depth of the current color component of the current video block, the method of any one of Solutions 43 to 47.
[0324] 49. The reconstruction offset of the escape symbol is based on the bit depth information, the method of Solution 36.
[0325] 50. The bit depth information is the difference (Δ BD as described) between the internal bit depth and the input bit depth, the method of solution 49.
[0326] 51. When K ≤ Δ BD the reconstructed offset is equal to p << K, where p is the decoded escape symbol and K is an integer, the method of solution 50.
[0327] 52. The reconstructed offset is equal to p << K when K ≤ T0, p is the decoded escape symbol, and K and T0 are integers, the method of solution 49.
[0328] 53. T0 = 2, the method of solution 50.
[0329] 54. The reconstructed offset is equal to (p << K)+((1 << (K - 1)) >> Δ BD << Δ BD ), p is the decoded escape symbol, and K is an integer, the method of solution 50.
[0330] 55. Δ BD is signaled in the bitstream representation at the sequence level, picture level, slice level, tile level, brick level, or subpicture level, the method of solution 50.
[0331] 56. The escape symbol is context-coded, the method of any one of solutions 22 to 55.
[0332] 57. The escape symbol is bypass-coded, the method of any one of solutions 22 to 55.
[0333] 58. g(Qp) is defined as (Qp - 4) / 6, the method of any one of solutions 25 to 27, 38 or 40.
[0334] 59. The method of any one of solutions 25-27, 39 or 40, wherein g(Qp) is defined as (max(M,Qp)-4) / 6, where M is an integer.
[0335] 60. The method of solution 59, wherein M is signaled in a sequence parameter set (SPS).
[0336] 61. The method of any one of Solutions 58 to 60, wherein g(Qp) is in the range [0, (bd-1)], where bd is the internal bit depth for the current color component of the current video block.
[0337] 62. A method of video processing, 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 conforms to format rules such that the current video block is coded using a palette mode coding tool, wherein one or more palette indices of the palette mode coding tool are coded without using reference indices, and wherein the palette mode coding tool represents the current video block using a palette of representative color values.
[0338] 63. The method of Solution 62, wherein the binarization of the one or more palette indices is a truncated binary (TB) code having a maximum palette index as a binarization input parameter.
[0339] 64. A method of video processing, 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 conforms to format rules that constrain the derivation between indices of escape symbols and indices of non-escaped symbols, wherein the current video block is coded using a palette mode coding tool, the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0340] 65. The method of solution 64, wherein the index of the escaped symbol is not permitted to be derived from the index of the non-escaped symbol.
[0341] 66. The method of solution 64, wherein it is not permitted to derive the index of the non-escaped symbol from the index of the escaped symbol.
[0342] 67. A method of video processing, 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 conforms to format rules such that the current video block is coded using a palette mode coding tool, a derived palette index of the palette mode coding tool having a maximum value, and the palette mode coding tool represents the current video block using a palette of representative color values.
[0343] 68. The method of solution 67, wherein the maximum value is the current pallet table size.
[0344] 69. The method of Solution 67, wherein the maximum value is the current palette table size excluding indices for one or more escape symbols, and an escape symbol from the one or more escape symbols is used for samples of the current video block that are coded without using the representative color value.
[0345] 70. A method of video processing, 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 conforms to a format rule in which a current video block to be coded using a palette mode coding tool is represented using syntax elements including escape symbols, values of indexes indicating the escape symbols are not changed for each of the one or more video regions, and the palette mode coding tool represents the current video block using a palette of representative color values, and the escape symbols are used for samples of the current video block to be coded without the representative color values.
[0346] 71. The method of solution 70, wherein said index is equal to MaxPaletteIndex.
[0347] 72. A method of video processing, 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 conforms to a format rule in which a current video block coded using a palette mode coding tool is represented using syntax elements coded based on a current index and a reference index, and wherein the palette mode coding tool represents the current video block using a palette of representative color values.
[0348] 73. The method of solution 72, wherein the difference between the current index and the reference index is coded.
[0349] 74. The method of Solution 73, wherein the coded representation of the differences excludes zero-valued differences.
[0350] 75. The method of solution 72, wherein the modulo of the difference between the current index and the reference index is coded.
[0351] 76. The method of Solution 75, wherein the modulo is expressed as I = modulo(CR, MaxPaletteIndex), where C is the current index, R is the reference index, and MaxPaletteIndex is a predetermined non-negative integer.
[0352] 77. The method of Solution 72, wherein at the beginning of a palette block of the palette mode coding tool, the reference index is set to −1.
[0353] 78. A method of video processing, 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 conforms to format rules whereby a current video block coded using a palette mode coding tool is represented using syntax elements including predictively coded escape symbols, wherein the palette mode coding tool represents the current video block using a palette of representative color values, and wherein the escape symbols are used for samples of the current video block coded without using the representative color values.
[0354] 79. The method of solution 78, wherein the escape symbols are predictively coded based on previously coded escape symbols.
[0355] 80. The method of Solution 78, wherein the escape symbols in a color component of the video are predictively coded based on values in the same color component.
[0356] 81. The method of Solution 78, wherein the escape symbol in a first color component of the video is predictively coded based on a value in a second color component of the video that is different from the first color component.
[0357] 82. A method of video processing, 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 conforms to a format rule in which the current video block coded using a palette mode coding tool is represented using syntax elements that are run-length coded in a context based on a palette index for indexing palette items, and wherein the palette mode coding tool represents the current video block using a palette of representative color values.
[0358] 83. The method of solution 82, wherein the context for the prefix of the length element is based on the palette index after the index adjustment process in the decoder.
[0359] 84. A method of video processing, 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 conforms to a format rule whereby a current video block coded using a palette mode coding tool is represented using a syntax element including a current palette index that is signaled independently of previous palette indexes, and wherein the palette mode coding tool represents the current video block using a palette of representative color values.
[0360] 85. The method of solution 84, wherein using the previous palette indexes is based on whether the current video block contains one or more escape symbols, and escape symbols are used for samples of the current video block that are coded without using the representative color values.
[0361] 86. A method of video processing, comprising: determining, based on an ordering rule, a first neighboring video block to be used to predict a quantization parameter for a current video block of one or more video regions of a video, and a second neighboring video block to be used to predictively determine a coding mode for the current video block; and performing, based on the determination, a conversion between the video and a bitstream representation of the video.
[0362] 87. The method of Solution 86, wherein the first neighboring video block is the top-left neighboring video block or the upper neighboring video block.
[0363] 88. The method of Solution 86 or 87, wherein the second neighboring video block is the top-left neighboring video block or the upper neighboring video block.
[0364] 89. The method of any one of Solutions 86 to 88, wherein the coding mode comprises a most probable mode (MPM) for the current video block.
[0365] 90. A method of video processing, 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 conforms to a format rule whereby a current video block coded using a palette mode coding tool is represented using a syntax element including a block-level quantization parameter (QP) difference regardless of whether the current video block includes an escape symbol; the palette mode coding tool represents the current video block using a palette of representative color values; and the escape symbol is used for samples of the current video block coded without using the representative color values.
[0366] 91. The method of solution 90, wherein the QP difference is coded for palette blocks having a width greater than a threshold.
[0367] 92. The method of Solution 90, wherein the QP difference is coded for palette blocks having a height greater than a threshold.
[0368] 93. A method of video processing, 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 conforms to a format rule in which a current video block coded using a palette mode coding tool is represented using a syntax element including one or more coding block flags (CBFs) for the palette block, and wherein the palette mode coding tool represents the current video block using a palette of representative color values.
[0369] 94. The method of Solution 93, wherein each of said CBFs is set equal to one.
[0370] 95. The method of Solution 93, wherein the one or more CBF values are based on whether the current video block includes an escape symbol, and the escape symbol is used for samples of the current video block that are coded without using the representative color value.
[0371] 96. A method of video processing, 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 conforms to a format rule in which a current video block coded using a palette mode coding tool is represented using a syntax element including one or more palette indices, the number of the one or more palette indices (NumPltIdx) being greater than or equal to K, and the palette mode coding tool represents the current video block using a palette of representative color values, and K is a positive integer.
[0372] 97.K is a method of solution 96 based on the current palette size (S), escape flag (E), or current video block size (BlkS).
[0373] 98. Solution 97, where K = S + E.
[0374] Solution 96, where 99.K is equal to the maximum palette index (MaxPaletteIndex) plus 1.
[0375] 100. The method of Solution 96, wherein one of the syntax elements includes NumPltIdx-K.
[0376] 101. A method of solution 100 in which the binarization of the value of (NumPltIdx-K) is a truncated binary code.
[0377] 102. The method of solution 100, in which the binarization of the value of (NumPltIdx-K) is a truncated unary code.
[0378] 103. The method of solution 101 or 102, wherein (BlkS-K) is a binarized input parameter and BlkS is the size of the current video block.
[0379] 104. A method of video processing, 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 conforms to a format rule whereby a current video block coded using a palette mode coding tool is represented using syntax elements based on a maximum size of a palette for the current block, a size of the current video block, use of a lossless mode, or a quantization parameter (QP), and wherein the palette mode coding tool represents the current video block using a palette of representative color values.
[0380] 105. The method of solution 104, wherein when it is determined that lossless mode is applied, that the QP is greater than a threshold, or that a transform skip is applied, the size of the palette for the current block is estimated to be equal to the size of the current video block.
[0381] 106. The method of any one of Solutions 1 to 105, wherein performing the conversion is further based on one or more of the video content of the video, 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 tile group header, a largest coding unit (LCU), a coding unit (CU), an LCU row, a group of LCUs, a transform unit (TU), a prediction unit (PU) block, or a message signaled in a video coding unit, an indication of the color format of the video, a coding tree structure, a temporal ID layer, or a standard profile, level, or hierarchy.
[0382] 107. A method of video processing, comprising: for conversion between a video including one or more video regions including a current video block and a bitstream representation of the video, determining that the current video block is coded in a block-based differential pulse code modulation (BDPCM) mode and divided into a plurality of transform blocks or sub-blocks; and as part of performing the conversion, performing residual prediction at a block level and including one or more residuals in the bitstream representation at a sub-block or transform block level based on the determination.
[0383] 108. A method of video processing, 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 conforms to format rules whereby the current video block is coded using a line-based coefficient group (CG) palette mode, the line-based CG palette mode using a palette of representative color values to represent multiple segments of each coding unit (CU) of the current video block.
[0384] 109. The method of Solution 108, wherein the bitstream representation includes an indication of whether an escape sample exists for each coefficient group, and the escape sample is used for samples of the current video block that are coded without using the representative color value.
[0385] 110. The method of solution 108, wherein the bitstream representation includes instructions for use of copying indexes on non-context coded data.
[0386] 111. The method of solution 110, wherein the instruction is bypass coded.
[0387] 112. The method of solution 108, wherein one or more copy flags, one or more run types, one or more indications of use of copying indexes, and escape values are signaled in an interleaved manner in the bitstream representation.
[0388] 113. The method of Solution 108, wherein the line-based CG palette mode is disabled when it is determined that the size of the current video block is less than or equal to a threshold (Th).
[0389] 114. The method of any one of Solutions 107 to 113, wherein performing the conversion is further based on one or more of the video content of the video, 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 tile group header, a largest coding unit (LCU), a coding unit (CU), an LCU row, a group of LCUs, a transform unit (TU), a prediction unit (PU) block, or a message signaled in a video coding unit, an indication of a color format of the video, a coding tree structure, a temporal ID layer, or a standard profile, level, or hierarchy.
[0390] 115. The method of any one of Solutions 1 to 114, wherein performing the conversion includes generating the bitstream representation from the one or more video regions.
[0391] 116. The method of any one of Solutions 1 to 114, wherein performing the conversion includes generating the one or more video regions from the bitstream representation.
[0392] 117. An apparatus in a video system comprising a processor and a non-transitory memory having instructions that, when executed by the processor, cause the processor to perform the method of any one of solutions 1 to 116.
[0393] 118. A computer program product stored on a non-transitory computer-readable medium, comprising a program code for performing the method of any one of solutions 1 to 116.
[0394] The disclosed and other solutions, examples, embodiments, modules, and functional operations described herein can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed herein and their structural equivalents, or in one or more combinations thereof. The disclosed 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 or to control the operation of a data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter embodying a machine-readable propagated signal, or one or more combinations thereof. The term "data processing apparatus" encompasses all apparatus, devices, and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. An apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, or one or more combinations thereof. A propagated signal is an artificially generated signal, for example, a machine-generated electrical, optical, or electromagnetic signal generated to encode information for transmission to a suitable receiver device.
[0395] A computer program (also known as a program, software, software application, script, or code) can be written in any programming language, including compiled or interpreted languages, and can be deployed in any form, including as a stand-alone program or as modules, components, subroutines, or other units suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can 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 in question, or in multiple cooperating files (e.g., a file storing one or more modules, subprograms, or code portions). A computer program can be deployed to be executed on one computer, or on multiple computers located at one site or distributed across multiple sites and interconnected by a communications network.
[0396] The processes and logic flows described herein may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by, and apparatus may be implemented as, special purpose logic circuitry, such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).
[0397] Processors suitable for executing a computer program include, by way of example, both general-purpose and special-purpose microprocessors, and any one or more processors of any kind of digital computer. Typically, a processor receives instructions and data from a read-only memory or a random-access memory, or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer also includes, or is operatively coupled to, one or more mass storage devices, e.g., magnetic, magneto-optical, or optical disks, for storing data. However, a computer need not have such devices. 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 memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special-purpose logic circuitry.
[0398] While this patent document contains many specificities, these should not be construed as limitations on the scope of any subject matter or what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular techniques. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, while features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination may, in some cases, be deleted from the combination, and the claimed combination may be directed to subcombinations or variations of the subcombination.
[0399] Similarly, although the figures depict acts in a particular order, this should not be construed as requiring that such acts be performed in the particular order depicted, or sequentially, or that all depicted acts be performed, to achieve desired results. Furthermore, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[0400] Only a few implementations and examples have been described, and other implementations, improvements and modifications may be made based on what is described and explained in this patent document.
Claims
1. A method for processing video data, comprising: determining that a prediction mode in a current video block is to be applied for conversion between the current video block of the video and the bitstream of the video, wherein in the prediction mode, the reconstructed samples are represented by at least one of: 1) a palette predictor, 2) escaped samples, or 3) information related to the palette included in the bitstream; performing the conversion based at least on the prediction mode; wherein when at least one of the reconstructed samples is represented by the escaped samples, a first syntax element specifying a quantized value of the escaped samples is included in the bitstream, and the binarization of the first syntax element uses an exponential Golomb (EG) code of order K, where K is a non-negative integer not equal to 3. A method.
2. The method according to claim 1, wherein K = 5.
3. The method according to claim 1 or 2, wherein the escaped samples are reconstructed based on a clip function and the quantized value of the escaped samples.
4. The reconstructed escape samples are determined based on Clip3(0, (1<<BitDepth) - 1, tmpVal), tmpVal is determined based on ((m<<(qP / 6)) + 32)>>6, qP specifies a quantization parameter, m is determined based on the quantized value of the escaped samples, The method according to claim 3.
5. The qP is determined based on Max(QpPrimeTsMin, Qp'Y), QpPrimeTsMin represents the minimum allowable quantization parameter for the transform skip mode, Qp'Y represents the luma quantization parameter, The method according to claim 4.
6. The method according to claim 5, wherein QpPrimeTsMin is defined as 6*n + 4, where n is the value of a second syntax element included in the bitstream.
7. The method according to claim 6, wherein the second syntax element is included at the sequence level of the bitstream.
8. The current video block is a luma block, a current palette including one or more palette predictors derived from a palette prediction table is constructed for the current video block, and the transform is further performed based on the current palette; a determination is made that local dual-tree coding is to be applied to the current video block; Based on the determination, the palette prediction table is modified, and modifying the palette prediction table includes a reset process.
8. The method according to any one of claims 1 to 7.
9. a quantization parameter used to derive the escaped samples is determined for a current video block, and the transform is further performed based on at least the quantization parameter; when the current video block is a chroma block, a quantization parameter for the chroma block is derived based on a mapping operation to a quantization parameter of a luma block corresponding to the chroma block; 9. The method according to any one of claims 1 to 8.
10. The method of claim 9 , wherein the quantization parameter is derived based on the variables and a clip function.
11. The method of claim 1 , wherein the lowest quantization parameter is indicated in a sequence parameter set in the bitstream.
12. The method of claim 1 , wherein the transforming comprises encoding a current video block into the bitstream.
13. The method of claim 1 , wherein the converting comprises decoding a current video block from the bitstream.
14. 1. An apparatus for processing video data, the apparatus having a processor and a non-transitory memory having instructions that, when executed by the processor, cause the processor to: determining a prediction mode to be applied to a current video block of a video for conversion between the current video block and a bitstream of the video, wherein reconstructed samples are represented by at least one of 1) a palette predictor, 2) escaped samples, or 3) palette-related information included in the bitstream; and performing the conversion based on at least the prediction mode; If at least one of the reconstructed samples is represented by the escaped sample, a first syntax element specifying a quantized value of the escaped sample is included in the bitstream, and the binarization of the first syntax element uses an Exponential-Golomb (EG) code of degree K, where K is a non-negative integer not equal to 3. Device.
15. A non-transitory computer-readable storage medium storing instructions that cause a processor to: For conversion between a current video block of a video and a bitstream of the video, determining a prediction mode to be applied to the current video block, in which reconstructed samples are represented by at least one of 1) a palette predictor, 2) escaped samples, or 3) palette-related information included in the bitstream; and performing the transformation based on at least the prediction mode if at least one of the reconstructed samples is represented by the escaped sample; a first syntax element specifying a quantized value of the escaped sample is included in the bitstream, and the binarization of the first syntax element uses an Exponential-Golomb (EG) code of degree K, where K is a non-negative integer not equal to 3; storage medium.
16. 1. A method for storing a video bitstream, the method comprising: determining, for a current video block of a video, a prediction mode to be applied to the current video block, wherein reconstructed samples are represented by at least one of 1) a palette predictor, 2) escaped samples, or 3) palette-related information included in the bitstream; generating the bitstream based on at least the prediction mode; storing the bitstream on a non-transitory computer-readable recording medium; If at least one of the reconstructed samples is represented by the escaped sample, a first syntax element specifying a quantized value of the escaped sample is included in the bitstream, and the binarization of the first syntax element uses an Exponential-Golomb (EG) code of degree K, where K is a non-negative integer not equal to 3. method.
Citation Information
Patent Citations
Restriction of Escape Pixel Signaling Values in Palette Mode Video Coding
JP2018532319A