Improved scan order for palette mode codecs
By using palette mode encoding and decoding technology combined with intra-frame block copy mode, the encoding and decoding process of video blocks is optimized, solving the problem of low screen content encoding and decoding efficiency in existing technologies and achieving more efficient video encoding and decoding effects.
Patent Information
- Application Number
- CN202080055003.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-29
- Filing Date
- 2020-07-29
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2040-07-29
AI Technical Summary
Existing video coding and decoding technologies are inefficient when processing screen content, especially intra-frame block copying and palette mode, and it is difficult to effectively utilize the redundancy of repeated patterns in videos.
The palette mode encoding and decoding technology is adopted. By using a small set of representative color values to represent video blocks and combining it with the intra-frame block copy mode, the encoding and decoding process of video blocks is optimized, including signaling the use of palette mode and dependence on prediction mode, determining the dimension and scanning order of blocks, applying deblocking filtering and modification of quantization parameters, and constructing motion candidate lists.
It improves the efficiency of video encoding and decoding, especially effectively eliminates redundancy in screen content, improves encoding and decoding quality and compression efficiency.
Smart Images

Figure CN114208188B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to and the benefit of International Patent Application No. PCT / CN2019 / 098204, filed on July 29, 2019, in accordance with applicable Patent Laws and / or the Paris Convention. The entire disclosure of the aforementioned application is incorporated herein by reference as a part of the disclosure of this application for all purposes prescribed by law. Technical Field
[0003] This document deals with video and image encoding and decoding techniques. Background Art
[0004] Digital video accounts for the largest usage of bandwidth on the Internet and other digital communication networks.As the number of connected user devices capable of receiving and displaying video increases, it is expected that bandwidth requirements for digital video usage will continue to grow. Summary of the Invention
[0005] The disclosed techniques may be used by video or image decoder or encoder embodiments that use palette mode codecs.
[0006] In one exemplary aspect, a video processing method is disclosed. The method includes performing conversion between a block of a video region of a video and a bitstream representation of the video. The bitstream representation is processed according to a first format rule and a second format rule, wherein the first format rule specifies a first indication of whether to signal use of a palette mode for the block, and the second format rule specifies a position of the first indication relative to a second indication of use of a prediction mode for the block.
[0007] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for converting between a block of a video region of a video and a bitstream representation of the video, a prediction mode based on one or more allowed prediction modes for the block, including at least a palette mode. Determining an indication of use of the palette mode based on the prediction mode. The method also includes performing the conversion based on the one or more allowed prediction modes.
[0008] In another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between blocks of a video and a bitstream representation of the video. The bitstream representation is processed according to a format rule, wherein the format rule specifies signaling a first indication of use of a palette mode and a second indication of use of an intra block copy (IBC) mode that are dependent on each other.
[0009] In another exemplary aspect, a method of video processing is disclosed. The method includes: for converting between a block of video and a bitstream representation of the video, determining, based on dimensions of the block, the presence of a palette mode usage indication in the bitstream representation; and performing the conversion based on the determining step.
[0010] In another exemplary aspect, a method of video processing is disclosed. The method includes: determining, for conversion between a block of video and a bitstream representation of the video, the presence of an indication of use of an intra block copy (IBC) mode in the bitstream representation based on dimensions of the block; and performing the conversion based on the determining step.
[0011] In another exemplary aspect, a method of video processing is disclosed. The method includes: determining, for converting between a block of video and a bitstream representation of the video, whether a palette mode is allowed for the block based on a second indication of a video region including the block; and performing the conversion based on the determining step.
[0012] In another exemplary aspect, a method of video processing is disclosed. The method includes: determining, for converting between a block of video and a bitstream representation of the video, whether an intra block copy (IBC) mode is allowed for the block based on a second indication of a video region that includes the block; and performing the conversion based on the determining step.
[0013] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for conversion between a block of video and a bitstream representation of the video, a first bit depth of a first sample associated with a palette entry in a palette mode. The first bit depth is different from a second bit depth associated with the block. The method further includes performing the conversion based on the determining step.
[0014] In another exemplary aspect, a method for video processing is disclosed. The method includes: for conversion between a current block of a video and a bitstream representation of the video, if a neighboring block of the current block coded in palette mode is located above or to the left of the current block, determining that the neighboring block of the current block coded in palette mode is to be processed as an intra-coded block with a default mode during construction of a most probable mode (MPM) candidate list for the current block. The method also includes: performing the conversion based on the determination.
[0015] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for a video block encoded and decoded into a bitstream representation as a palette-mode codec block, parameters for deblocking filtering according to a rule. The method also includes performing conversion between the block and a bitstream representation of the video using the parameters for deblocking filtering.
[0016] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for conversion between a current block of a video and a bitstream representation of the video, that a neighboring block of the current block, encoded in a palette mode, be processed as a non-intra-coded block during construction of a most probable mode (MPM) candidate list for the current block. The method also includes performing the conversion based on the determination.
[0017] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for a block of video, a quantization parameter associated with the block; encoding and decoding the block of video as a palette-encoded block into a bitstream representation of the video based in part on a modified value of the quantization parameter; and signaling codec information related to the quantization parameter in the bitstream representation.
[0018] In another exemplary aspect, a method of video processing is disclosed. The method includes deriving a quantization parameter based on a bitstream representation of the video, and decoding a palette codec block based in part on a modified quantization parameter determined by modifying the quantization parameter.
[0019] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for a video block encoded into a bitstream representation of a video as a palette-encoded block, a representation of escape samples of the block in the bitstream representation, regardless of whether a bypass mode is enabled for the block. The method also includes performing a conversion between the block and the bitstream representation based on the determining step.
[0020] In another exemplary aspect, a method of video processing is disclosed. The method includes determining a first quantization process for a video block encoded into a bitstream representation as a block encoded in a palette codec. The first quantization process is different from a second quantization process applicable to a block encoded in a non-palette mode. The method also includes performing a conversion between the block and the bitstream representation based on the determining step.
[0021] In another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including a luma block and a corresponding chroma block and a bitstream representation of the video according to a rule. The rule specifies that for a current luma block encoded using a palette codec mode and a corresponding current chroma block encoded using a derived mode, the current luma block is treated as having a default intra-frame prediction mode, and the current chroma block is encoded using the default intra-frame prediction mode. The palette codec mode includes encoding and decoding the current luma block using a palette of representative sample values.
[0022] In another exemplary aspect, a method of video processing is disclosed. The method includes performing a conversion between a video comprising one or more blocks and a bitstream representation of the video. For the conversion, a list of motion candidates is constructed for each block according to a rule. The rule specifies that, for encoding and decoding consecutive blocks, motion information for blocks encoded using a palette encoding mode is treated as unavailable or invalid.
[0023] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for a video block encoded into a bitstream representation as a palette-mode codec, a number of binary digits for a context codec of the block based on a rule. The method also includes performing conversion between the video block and the bitstream representation of the video based on the determining step.
[0024] In another exemplary aspect, a method of video processing is disclosed. The method includes performing conversion between a video including a luma block and a corresponding chroma block and a bitstream representation of the video according to a rule, the rule specifying that, for a current luma block encoded using a palette codec mode and a corresponding current chroma block encoded using a derived mode, the current luma block is treated as having a default intra prediction mode and the current chroma block is encoded using the default intra prediction mode. The palette codec mode includes encoding and decoding the current luma block using a palette of representative sample values.
[0025] In another exemplary aspect, a method of video processing is disclosed. The method includes performing a conversion between a video comprising one or more blocks and a bitstream representation of the video, wherein for the conversion, a motion candidate list for each block is constructed according to a rule that specifies that for encoding and decoding consecutive blocks, motion information for blocks encoded using a palette encoding mode is treated as unavailable or invalid.
[0026] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for a video block encoded into a bitstream representation as a palette-mode codec, a number of binary digits for a context codec of the block based on a rule. The method also includes performing conversion between the video block and the bitstream representation of the video based on the determining step.
[0027] In another exemplary aspect, a method of video processing is disclosed. The method includes determining, for a conversion between a current block of a video and a bitstream representation of the video, a number of neighboring blocks of the current block that are intra-coded for a combined inter- and intra-prediction mode according to a rule. The rule specifies how blocks encoded using a palette codec mode are treated in counting the number of neighboring blocks that are intra-coded for the combined inter- and intra-prediction mode, wherein using the palette codec mode includes encoding the block using a palette of representative sample values. The method also includes performing the conversion based on the determining step.
[0028] In another exemplary aspect, a method for video processing is disclosed. The method includes determining, for conversion between a current block of video and a bitstream representation of the video, a sample skipping operation for the current block during filtering. The samples are encoded and decoded using a palette codec mode, wherein using the palette codec mode includes encoding and decoding the block using a palette of representative sample values. The method also includes performing the conversion based on the determining step.
[0029] In another exemplary aspect, a method of video processing is disclosed. The method includes determining a scan order selected from three or more scan orders for converting between a block of video and a bitstream representation of the video. The block is encoded or decoded in palette mode using a palette of representative sample values. The method also includes performing the conversion based on the determining step.
[0030] In another exemplary aspect, a method of video processing is disclosed. The method includes determining one or more scan orders for converting between a block of video and a bitstream representation of the video, wherein coefficients of the block are scanned in the one or more scan orders based on a shape of the block. The method also includes performing the conversion based on the determining step.
[0031] In another exemplary aspect, a method of video processing is disclosed. The method includes, for converting between a block of video and a bitstream representation of the video, determining, for a block-based quantized residual domain differential pulse coding modulation (BDPCM) process, a unique scanning order to apply to the block, wherein coefficients of the block are scanned in the unique scanning order, and representing a difference between a quantized residual of an intra-frame prediction of the block and a prediction of the quantized residual in the bitstream representation of the block using differential pulse coding modulation (DPCM) in the BDPCM process. The method also includes performing the conversion based on the determining step.
[0032] In another exemplary aspect, a method of video processing is disclosed, comprising: determining a palette mode to be used for processing a transform unit, a codec block, or a region, encoding use of the palette mode separately from a prediction mode, and performing further processing on the transform unit, the codec block, or the region using the palette mode.
[0033] In another exemplary aspect, a method of video processing is disclosed, the method comprising: determining, for a current video block, samples associated with a palette entry of a palette mode having a first bit depth that is different from a second bit depth associated with the current video block; and performing further processing of the current video block based at least on the palette entry.
[0034] In another exemplary aspect, another video processing method is disclosed, the method comprising: performing a conversion between a current video block of a picture of a video and a bitstream representation of the video, wherein information regarding whether intra block copying (IBCC) is used in the conversion is signaled in the bitstream representation or derived based on a codec condition of the current video block, and wherein the intra block copy mode comprises encoding and decoding the current video block from another video block in the picture.
[0035] In yet another exemplary aspect, another method of video processing is disclosed. The method includes determining whether to apply a deblocking filter during conversion of a current video block of a video picture, wherein the current video block is encoded or decoded using a palette mode codec in which the current video block is represented using fewer representative sample values than the total number of pixels in the current video block; and performing the conversion such that the deblocking filter is applied if it is determined that the deblocking filter is to be applied.
[0036] In yet another exemplary aspect, another method of video processing is disclosed, the method comprising determining a quantization or inverse quantization process to be used during conversion between a current video block of a picture of a video and a bitstream representation of the video, wherein the current video block is encoded or decoded using a palette mode codec in which the current video block is represented using fewer representative sample values than the total number of pixels of the current video block; and performing the conversion based on the determination of the quantization or inverse quantization process.
[0037] In yet another exemplary aspect, another method of video processing is disclosed, the method comprising: for conversion between a current video block of a video comprising a plurality of video blocks and a bitstream representation of the video, determining that the current video block is a palette-coded block; based on the determination, performing a most probable mode list building process by considering the current video block as an intra-coded block; and performing the conversion based on a result of the list building process; wherein the palette-coded block is encoded or decoded using a palette or representative sample values.
[0038] In yet another exemplary aspect, another method of video processing is disclosed, the method comprising: for conversion between a current video block of a video comprising a plurality of video blocks and a bitstream representation of the video, determining that the current video block is a palette-coded block; based on the determination, performing a most probable mode list building process by considering the current video block as a non-intra-coded block; and performing the conversion based on a result of the list building process; wherein the palette-coded block is encoded or decoded using a palette or representative sample values.
[0039] In yet another exemplary aspect, another method of video processing is disclosed, the method comprising: for converting between a current video block of a video comprising a plurality of video blocks and a bitstream representation of the video, determining that the current video block is a palette-coded block; based on the determining step, performing a list building process by considering the current video block as an unusable block; and performing the conversion based on a result of the list building process; wherein the palette-coded block is encoded or decoded using a palette or representative sample values.
[0040] In yet another exemplary aspect, another method of video processing is disclosed, the method comprising: determining, during conversion between a current video block and a bitstream representation of the current video block, that the current video block is a palette-coded block; determining a range of context codec binary numbers for the conversion based on the current video block being the palette-coded block; and performing the conversion based on the range of context codec binary numbers.
[0041] In yet another exemplary aspect, the above method may be implemented by a video encoder device comprising a processor.
[0042] In yet another exemplary aspect, the methods may be embodied in the form of processor-executable instructions and stored on a computer-readable program medium.
[0043] These and other aspects are described further throughout this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 An example of intra block copy is shown.
[0045] Figure 2 An example of a block encoded and decoded in palette mode is shown.
[0046] Figure 3 An example of using palette prediction sub-signaling to signal palette entries is shown.
[0047] Figure 4 Examples of horizontal and vertical traversal scans are shown.
[0048] Figure 5 An example of encoding and decoding of palette indexes is shown.
[0049] Figure 6 is a block diagram of an example of a video processing device.
[0050] Figure 7 A block diagram of an exemplary implementation of a video encoder is shown.
[0051] Figure 8 is a flowchart of an example of a video processing method.
[0052] Figure 9 Examples of pixels involved in filter on / off decisions and strong / weak filter selection are shown.
[0053] Figure 10 An example of binarization of four patterns is shown.
[0054] Figure 11 An example of binarization of four patterns is shown.
[0055] Figure 12 Examples of 67 intra mode prediction directions are shown.
[0056] Figure 13 An example of adjacent video blocks is shown.
[0057] Figure 14 Examples of ALF filter shapes are shown (chroma: 5×5 diamond, luma: 7×7 diamond).
[0058] Figure 15A An example of subsampled Laplacian computation for vertical gradients is shown.
[0059] Figure 15B An example of subsampled Laplacian computation for horizontal gradients is shown.
[0060] Figure 15C An example of subsampled Laplacian computation for diagonal gradients is shown.
[0061] Figure 15D An example of subsampled Laplacian computation for diagonal gradients is shown.
[0062] Figure 16 An example of modified block classification at a virtual boundary is shown.
[0063] Figure 17 An example of modified ALF filtering for the luma component at a virtual boundary is shown.
[0064] Figure 18 Examples of four 1-D 3-pixel patterns used for pixel classification in EO are shown.
[0065] Figure 19 An example of four bands is shown, where the four bands are clustered together and represented by their starting band positions.
[0066] Figure 20 Examples of upper and left neighboring blocks used in CIIP weight derivation are shown.
[0067] Figure 21 An example of luma mapping with a chroma scaling architecture is shown.
[0068] Figure 22 An example of the scanning order of 4x4 blocks is shown.
[0069] Figure 23 Another example of the scanning order of 4x4 blocks is shown.
[0070] Figure 24 is a block diagram illustrating an example video processing system 2400 in which the techniques disclosed herein may be implemented.
[0071] Figure 25 Shown is a flowchart representation of another method for video processing according to the present technology.
[0072] Figure 26 Another flowchart representation of another method for video processing according to the present technology is shown.
[0073] Figure 27 Another flowchart representation of another method for video processing according to the present technology is shown.
[0074] Figure 28 Another flowchart representation of another method for video processing according to the present technology is shown.
[0075] Figure 29 Another flowchart representation of another method for video processing according to the present technology is shown.
[0076] Figure 30 Another flowchart representation of another method for video processing according to the present technology is shown.
[0077] Figure 31 Another flowchart representation of another method for video processing according to the present technology is shown.
[0078] Figure 32 Another flowchart representation of another method for video processing according to the present technology is shown.
[0079] Figure 33 Another flowchart representation of another method for video processing according to the present technology is shown.
[0080] Figure 34 Another flowchart representation of another method for video processing according to the present technology is shown.
[0081] Figure 35 Another flowchart representation of another method for video processing according to the present technology is shown.
[0082] Figure 36A Another flowchart representation of another method for video processing according to the present technology is shown.
[0083] Figure 36B Another flowchart representation of another method for video processing according to the present technology is shown.
[0084] Figure 37 Another flowchart representation of another method for video processing according to the present technology is shown.
[0085] Figure 38 Another flowchart representation of another method for video processing according to the present technology is shown.
[0086] Figure 39 Another flowchart representation of another method for video processing according to the present technology is shown.
[0087] Figure 40 Another flowchart representation of another method for video processing according to the present technology is shown.
[0088] Figure 41 Another flowchart representation of another method for video processing according to the present technology is shown.
[0089] Figure 42 Another flowchart representation of another method for video processing according to the present technology is shown.
[0090] Figure 43 Another flowchart representation of another method for video processing according to the present technology is shown.
[0091] Figure 44 Another flowchart representation of another method for video processing according to the present technology is shown.
[0092] Figure 45 Another flowchart representation of another method for video processing according to the present technology is shown.
[0093] Figure 46 Yet another flowchart representation of another method for video processing according to the present technology is shown. DETAILED DESCRIPTION
[0094] This document provides various techniques that can be used by decoders of image or video bitstreams to improve the quality of decompressed or decoded digital video or images. For the sake of brevity, the terms used in this document include both picture sequences (often referred to as videos) and individual images. In addition, video encoders can also implement these techniques during the encoding process to reconstruct decoded frames for further encoding.
[0095] The section headings are used herein for ease of understanding, but not to limit the embodiments and techniques to the corresponding sections. As such, embodiments from one section can be combined with embodiments from other sections.
[0096] 1. Overview
[0097] This document relates to video codec technology. Specifically, this document relates to palette codecs that use a representation based on primary colors in video codecs. This document can be applied to existing video codec standards, such as HEVC, or to a pending standard (Versatile Video Codec). It can also be applied to future video codec standards or video codecs.
[0098] 2. Preliminary Discussion
[0099] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Visual, and the two organizations jointly developed H.262 / MPEG-2 Visual, H.264 / MPEG-4 Advanced Video Codec (AVC), and H.265 / HEVC. Since H.262, video codec standards have been based on a hybrid video codec architecture that utilizes temporal prediction plus transform codecs. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new approaches and incorporated them into reference software called the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Team (JVET) was established between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) to develop the VVC standard, where the VVC standard aims to reduce the bit rate by 50% compared to HEVC.
[0100] Figure 7 is a block diagram of an exemplary implementation of a video encoder. Figure 7 The encoder implementation is shown to have a built-in feedback path in which the video encoder also performs a decoding function (reconstructing a compressed representation of the video data for use in subsequent encoding of the video data).
[0101] 2.1 Intra-frame Block Copy
[0102] Intra-frame block copy (IBC), also known as current picture reference, has been adopted into HEVC Screen Content Codec Extension (HEVC-SCC) and the current VVC Test Model (VTM-4.0). IBC extends the concept of motion compensation from inter-frame codecs to intra-frame codecs. Figure 1 As shown in the figure, when IBC is applied, the current block is predicted by the reference block in the same picture. Before the current block is encoded or decoded, the samples in the reference block must have been reconstructed. Although IBC is not so efficient for most camera capture sequences, it shows significant codec gains for screen content. The reason is that there are a large number of repeated patterns in the screen content pictures, such as icons and text characters. IBC can effectively eliminate the redundancy between these repeated patterns. In HEVC-SCC, if the inter-frame coding and decoding codec unit (CU) selects the current picture as its reference picture, the CU can apply IBC. In this case, MV is renamed block vector (BV), and BV always has integer pixel precision. In order to be compatible with the main profile HEVC, the current picture is marked as a "long-term" reference picture in the decoded picture buffer (DPB). It should be noted that, similarly, in the multi-view / 3D video coding standard, inter-view reference pictures are also marked as "long-term" reference pictures.
[0103] In the case of finding its reference block according to the BV, the prediction can be generated by copying the reference block. The residual can be obtained by subtracting the reference pixels from the original signal. Then, the transformation and quantization can be applied as in other codec modes.
[0104] However, when the reference block is outside the picture, overlaps with the current block, is outside the reconstructed region, or is outside the valid region limited by certain constraints, some or all pixel values are undefined. There are basically two approaches to dealing with this problem. One approach is to disallow such situations, for example, in bitstream conformance. The other approach is to apply padding to those undefined pixel values. The following subsections describe these approaches in detail.
[0105] 2.2 IBC in HEVC Screen Content Codec Extension
[0106] In the screen content codec extension of HEVC, when a block uses the current picture as a reference, it should be ensured that the entire reference block is within the available reconstruction area, as shown in the following normative text:
[0107] The variables offsetX and offsetY are derived as follows:
[0108] offsetX=(ChromaArrayType==0)? 0:(mvCLX[0]&0x7?2:0) (8-106)
[0109] offsetY=(ChromaArrayType==0)? 0:(mvCLX[1]&0x7?2:0) (8-107)
[0110] The bitstream consistency requirement is that when the reference picture is the current picture, the luminance motion vector mvLX must obey the following constraints:
[0111] - When the derivation process for z-scan order block availability specified in clause 6.4.1 is called with as input (xCurr, yCurr) set equal to (xCb, yCb) and the adjacent luma position (xNbY, yNbY) set equal to (xPb+(mvLX[0]>>2)-offsetX, yPb+(mvLX[1]>>2)-offsetY), the output shall be equal to true.
[0112] - When the derivation of the z-scan order block availability specified in clause 6.4.1 is called with as input (xCurr, yCurr) set equal to (xCb, yCb), and the adjacent luma position (xNbY, yNbY) set equal to (xPb+(mvLX[0]>>2)+nPbW-1+offsetX, yPb+(mvLX[1]>>2)+nPbH-1+offsetY), the output shall be equal to true.
[0113] -One or both of the following conditions must be true:
[0114] The value of -(mvLX[0]>>2)+nPbW+xB1+offsetX is less than or equal to 0.
[0115] The value of -(mvLX[1]>>2)+nPbH+yB1+offsetY is less than or equal to 0.
[0116] -The following conditions should be true:
[0117] (xPb+(mvLX[0]>>2)+nPbSw-1+offsetX) / CtbSizeY-xCurr / CtbSizeY<=yCurr / CtbSizeY-(yPb+(mvLX[1]>>2)+nPbSh-1+offsetY) / CtbSizeY (8-108)
[0118] Therefore, there will be no situation where the reference block overlaps with the current block or is outside the picture. There is no need to pad the reference block or the prediction block.
[0119] 2.3 IBC in VCC Test Model
[0120] In current VCC test models, such as the VTM-4.0 design, the entire reference block should be co-located with the current codec tree unit (CTU) and should not overlap with the current block. Therefore, no padding of the reference block or prediction block is required. The IBC flag is encoded as the prediction mode of the current CU. Thus, there are three prediction modes for each CU: MODE_INTRA, MODE_INTER, and MODE_IBC.
[0121] 2.3.1 IBC Merge Mode
[0122] In IBC Merge mode, the index pointing to the entry in the IBC merge candidate list is parsed from the bitstream. The construction of the IBC merge list can be summarized according to the following sequence of steps:
[0123] Step 1: Derivation of spatial candidates
[0124] Step 2: Insertion of HMVP candidates
[0125] Step 3: Insertion of pairwise average candidates
[0126] In the derivation of spatial merge candidates, up to four merge candidates are selected from the candidates at the positions shown in the accompanying drawings. The order of derivation is A1, B1, B0, A0 and B2. Position B2 is only considered when any prediction unit (PU) at position A1, B1, B0, A0 is not available (for example, because it belongs to another strip or slice) or when IBC mode encoding and decoding is not adopted. After adding the candidate at position A1, a redundancy check is performed on the insertion of the remaining candidates, wherein the redundancy check ensures that candidates with the same motion information are excluded from the list, thereby improving encoding and decoding efficiency. In order to reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead, only pairs connected by the arrows shown in the accompanying drawings are considered, and candidates will be added to the list only when the corresponding candidates used for the redundancy check do not have the same motion information.
[0127] After inserting the spatial candidates, if the IBC merge list size is still less than the maximum IBC merge list size, then IBC candidates from the HMVP table can be inserted. A redundancy check is performed when inserting HMVP candidates.
[0128] Finally, the pairwise average candidates are inserted into the IBC merge list.
[0129] When the reference block identified by the merge candidate is outside the picture, or overlaps with the current block, or is outside the reconstruction area, or is outside the valid area limited by certain constraints, the merge candidate is called an invalid merge candidate.
[0130] It should be noted that invalid merge candidates may be inserted into the IBC merge list.
[0131] 2.3.2 IBC AMVP Model
[0132] In IBC AMVP mode, the AMVP index pointing to the entry in the IBC AMVP list is parsed from the bitstream. The construction of the IBC AMVP list can be summarized according to the following sequence of steps:
[0133] Step 1: Derivation of spatial candidates
[0134] Check A0, A1 until a usable candidate is found.
[0135] Check B0, B1, B2 until a usable candidate is found.
[0136] Step 2: Insertion of HMVP candidates
[0137] Step 3: Insertion of zero candidates
[0138] After inserting the spatial candidates, if the IBC AMVP list size is still smaller than the maximum IBC AMVP list size, the IBC candidates from the HMVP table may be inserted.
[0139] Finally, zero candidates are inserted into the IBC AMVP list.
[0140] 2.4 Palette Mode
[0141] The basic concept behind the palette mode is to represent samples in a CU by a small set of representative color values. This set is called the palette. Samples outside the palette can also be indicated by signaling an escape symbol followed by a (possibly quantized) component value. Figure 2 This situation is exemplified in .
[0142] 2.5 Palette Mode in HEVC Screen Content Codec Extension (HEVC-SCC)
[0143] In the palette mode of HEVC-SCC, the palette and index mapping are encoded and decoded in a predictive manner.
[0144] 2.5.1 Encoding and decoding of palette entries
[0145] In order to encode and decode the palette entries, the palette predictor is maintained. The maximum size of the palette and the palette predictor are signaled in the sequence parameter set (SPS). In HEVC-SCC, palette_predictor_initializer_present_flag is introduced in the PPS. When this flag is 1, the entry for initializing the palette predictor is signaled in the bitstream. The palette predictor is initialized at the beginning of each CTU row, each slice, and each slice. Depending on the value of palette_predictor_initializer_present_flag, the palette predictor is reset to 0 or initialized using the palette predictor initializer entry signaled in the PPS. In HEVC-SCC, a palette predictor initializer of size 0 is enabled to allow palette predictor initialization to be explicitly disabled at the PPS level.
[0146] For each entry in the palette predictor, a reuse flag is signaled to indicate whether the reuse flag is part of the current palette. Figure 3 This is shown in Figure 1. A reuse flag is sent using a run-length codec of zero. After this, the number of new palette entries is signaled using an order 0 Exponential Golomb code. Finally, the component values for the new palette entries are signaled.
[0147] 2.5.2 Encoding and decoding of palette indexes
[0148] Use as Figure 4 The palette index is encoded and decoded using horizontal and vertical traversal scans as shown. 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.
[0149] The palette index is encoded and decoded using two main palette sample modes: "INDEX" and "COPY_ABOVE". As mentioned before, escape symbols are also signaled as "INDEX" mode and are assigned an index equal to the maximum palette size. This mode is signaled using a flag except for the top row, or when the previous mode was "COPY_ABOVE". In "COPY_ABOVE" mode, the palette index of the sample in the row above is copied. In "INDEX" mode, the palette index is signaled explicitly. For both "INDEX" and "COPY_ABOVE" modes, a run value is signaled, where the run value specifies the number of subsequent samples that are also encoded and decoded using the same mode. When the escape symbol is part of a run in "INDEX" or "COPY_ABOVE" mode, the escape component value is signaled for each escape symbol. Figure 5 The encoding and decoding of palette indexes are shown in .
[0150] This syntax sequence is accomplished as follows. First, the number of index values for the CU is signaled. After this, the actual index values for the entire CU are signaled using truncated binary codec. Both the number of indices and the index values are coded in bypass mode. This clusters the index-related bypass bins together. Then, the palette sample mode (if necessary) and run length are signaled in an alternating manner. Finally, the component escape values corresponding to the escape samples for the entire CU are clustered together and coded in bypass mode.
[0151] After signaling the index value, an additional syntax element last_run_type_flag is signaled. This syntax element combined with the index number eliminates the need to signal the run value corresponding to the last run in the block.
[0152] In HEVC-SCC, palette mode is also enabled for 4:2:2, 4:2:0 and monochrome chroma formats. The signaling of palette entries and palette indices is almost the same for all chroma formats. For non-monochrome formats, each palette entry consists of 3 components. For monochrome formats, each palette entry consists of a single component. For the subsampled chroma direction, chroma samples are associated with luma sample indices that are divisible by 2. After the palette index is reconstructed for the CU, only the first component of the palette entry is used if the sample has only a single component associated with it. The only difference in the signaling is for the escape component values. For each escape sample, the number of signaled escape component values can be different depending on the number of components associated with the sample.
[0153] In VVC, a dual-tree codec structure is used when encoding and decoding intra slices, so the luma component and the two chroma components can have different palettes and palette indices. In addition, the two chroma components share the same palette and palette index.
[0154] 2.6 Deblocking Scheme in VVC
[0155] Note that in the following description, pN M represents the Nth sample point on the left relative to the vertical edge in the Mth row or the Nth sample point on the top relative to the horizontal edge in the Mth column, qN M It represents the Nth sample point on the right side relative to the vertical edge in the Mth row or the Nth sample point on the bottom side relative to the horizontal edge in the Mth column. Figure 9 pN is shown in M and qN M .
[0156] Note that in the following description, p Nrepresents the Nth sample point on the left relative to the vertical edge in a row or the Nth sample point on the top relative to the horizontal edge in a column, q N It represents the Nth sample point on the right side relative to the vertical edge in a row or the Nth sample point on the bottom side relative to the horizontal edge in a column.
[0157] Filter on / off decisions are made for four lines as a unit. Figure 9 The pixels involved in the filter on / off decision are shown. The filter on / off is determined for 4 lines using the 6 pixels in the two red boxes for the first 4 lines. The filter on / off is determined for the second four lines using the 6 pixels in the two red boxes for the second 4 lines.
[0158] In some embodiments, vertical edges in the picture are filtered first. Horizontal edges in the picture are then filtered using the samples modified by the vertical edge filtering process as input. Vertical and horizontal edges in the CTBs of each CTU are processed separately on a per-codec unit basis. Vertical edges of codec blocks within a codec unit are filtered starting from the edge on the left side of the codec block and proceeding through each edge in their geometric order toward the right side of the codec block. Horizontal edges of codec blocks within a codec unit are filtered starting from the edge on the top side of the codec block and proceeding through each edge in their geometric order toward the bottom of the codec block.
[0159] 2.6.1 Boundary Decision
[0160] The filter is applied to 8x8 block boundaries. Furthermore, it must be a transform block boundary or a codec subblock boundary (e.g. due to the use of affine motion prediction, ATMVP). For boundaries that are not such boundaries, the filter is disabled.
[0161] 2.6.2 Boundary strength calculation
[0162] For transform block boundary / codec sub-block boundary, if it lies in 8x8 grid, it can be filtered and the bS[xD] of this edge is defined as follows i ][yD j ] settings (where [xD i ][yD j ] indicates coordinates):
[0163] - If the sample point p0 or q0 is in the codec block of the codec unit coded and decoded in intra-frame prediction mode, then bS[xD i ][yD j ] is set to equal to 2.
[0164] Otherwise, if the block edge is also a transform block edge and the sample p0 or q0 is in a transform block that includes one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set to be equal to 1.
[0165] Otherwise, if the prediction mode of the coded sub-block including sample p0 is different from the prediction mode of the coded sub-block including sample q0, then bS[xD i ][yD j ] is set to be equal to 1.
[0166] - Otherwise, if one or more of the following conditions are true, then bS[xD i ][yD j ] is set to 1:
[0167] -The codec sub-block including sample p0 and the codec sub-block including sample q0 are both coded in IBC prediction mode, and the absolute difference between the horizontal or vertical components of the motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in units of quarter luma samples.
[0168] For the prediction of the coded sub-block including the sample p0, a different reference picture or a different number of motion vectors than those used for the prediction of the coded sub-block including the sample q0 is used.
[0169] NOTE 1 – Whether the reference pictures used for two codec sub-blocks are the same or different is determined solely based on which pictures are referenced, regardless of whether the prediction is formed using an index from reference picture list 0 or an index from reference picture list 1, and regardless of whether the index positions within the reference picture lists are different.
[0170] NOTE 2 – The number of motion vectors used to predict the codec sub-block with the top left sample covering (xSb, ySb) is equal to PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb].
[0171] - Use a motion vector to predict the codec sub-block including sample p0, and use a motion vector to predict the codec sub-block including sample q0, and the absolute difference between the horizontal or vertical components of the motion vectors used is greater than or equal to 4 in units of quarter luma samples.
[0172] - Two motion vectors and two different reference pictures are used to predict the codec sub-block including sample p0, two motion vectors for the same two reference pictures are used to predict the codec sub-block including sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two codec sub-blocks for the same reference picture is greater than or equal to 4 in units of quarter luma samples.
[0173] - The codec sub-block including sample p0 is predicted using two motion vectors for the same reference picture, the codec sub-block including sample q0 is predicted using two motion vectors for the same reference picture, and both of the following conditions are true:
[0174] - The absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in quarter-sample units, or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in quarter-sample units.
[0175] - The absolute difference between the horizontal or vertical component of the List 0 motion vector used in the prediction of the codec sub-block including sample p0 and the List 1 motion vector used in the prediction of the codec sub-block including sample q0 is greater than or equal to 4 in units of quarter samples, or the absolute difference between the horizontal or vertical component of the List 1 motion vector used in the prediction of the codec sub-block including sample p0 and the List 0 motion vector used in the prediction of the codec sub-block including sample q0 is greater than or equal to 4 in units of quarter samples.
[0176] - Otherwise, the variable bS[xD i ][yD j ] is set to equal to 0.
[0177] Table 2-1 and Table 2-2 summarize the BS calculation rules.
[0178] Table 2-1 Boundary Strength (When SPS IBC is disabled)
[0179]
[0180]
[0181] Table 2-2 Boundary Strength (When SPS IBC is Enabled)
[0182]
[0183] 2.6.3 Deblocking Decision for Luma Component
[0184] In this subsection the deblocking decision process is described.
[0185] The wider stronger brightness filter is a filter that is used only when conditions 1, 2, and 3 are all true.
[0186] Condition 1 is the "large block condition". This condition checks whether the samples on the P side and Q side belong to large blocks represented by the variables bSidePisLargeBlk and bSideQisLargeBlk, respectively. bSidePisLargeBlk and bSideQisLargeBlk are defined as follows.
[0187] bSidePisLargeBlk = ((edge type is vertical, and p0 belongs to a CU with width >= 32) || (edge type is horizontal, and p0 belongs to a CU with height >= 32))? TRUE:FALSE
[0188] bSideQisLargeBlk = ((edge type is vertical, and q0 belongs to a CU with width >= 32) || (edge type is horizontal, and q0 belongs to a CU with height >= 32))? TRUE:FALSE
[0189] Based on bSidePisLargeBlk and bSideQisLargeBlk, condition 1 is defined as follows.
[0190] Condition 1=(bSidePisLargeBlk||bSidePisLargeBlk)? TRUE:FALSE
[0191] Next, if condition 1 is true, condition 2 will be checked. First, the following variables are derived:
[0192] -First, derive dp0, dp3, dq0, dq3 as in HEVC
[0193] -if (p side is greater than or equal to 32)
[0194] dp0=(dp0+Abs(p50-2*p40+p30)+1)>>1
[0195] dp3=(dp3+Abs(p53-2*p43+p33)+1)>>1
[0196] -if (q side is greater than or equal to 32)
[0197] dq0=(dq0+Abs(q50-2*q40+q30)+1)>>1
[0198] dq3=(dq3+Abs(q53-2*q43+q33)+1)>>1
[0199] Condition 2 = (d < β)? TRUE:FALSE
[0200] Wherein, d=dp0+dq0+dp3+dq3, as shown in Section 2.2.4.
[0201] If conditions 1 and 2 are valid, it further checks whether any block uses sub-blocks:
[0202]
[0203]
[0204] Finally, if both conditions 1 and 2 are valid, the proposed deblocking method will check condition 3 (large block strong filter condition), which is defined as follows.
[0205] In condition 3StrongFilterCondition, derive the following variables:
[0206] dpq is derived as in HEVC.
[0207] sp3 = Abs(p3 - p0), derived as in HEVC
[0208] if (p side is greater than or equal to 32)
[0209]
[0210] sq3 = Abs(q0 - q3), derived as in HEVC
[0211] if (q side is greater than or equal to 32)
[0212]
[0213] As in HEVC, StrongFilterCondition = (dpq less than (β>>2), sp3+sq3 less than (3*β>>5), and Abs(p0-q0) less than (5*t C +1)>>1)? TRUE:FALSE.
[0214] 2.6.4 Stronger deblocking filter for luma (designed for larger blocks)
[0215] When samples on either side of the boundary belong to a large block, a bilinear filter is used.A sample belonging to a large block is defined as when width>=32 for vertical edges or height>=32 for horizontal edges.
[0216] The following is an example of a bilinear filter.
[0217] Then the block boundary samples p are replaced by linear interpolation as follows i (for i=0 to Sp-1) and q i (for j=0 to Sq-1), pi and qi are the i-th samples in rows for vertical edge filtering or in columns for horizontal edge filtering in the above HEVC deblocking:
[0218] —p i ′=(f i *Middle s,t +(64-f i )*P s +32)>>6), crop to p i ±tcPD i
[0219] —q j ′=(g j *Middle s,t +(64-g j )*Q s +32)>>6), crop to q j ±tcPD j
[0220] Among them, tcPD i and tcPD j The term is position-dependent clipping as described in Section 2.3.6, and g j 、f i 、Middle s,t 、P s and Q s Given in Table 2-3:
[0221] Table 2-3 Long tap deblocking filter
[0222]
[0223]
[0224] 2.6.5 Deblocking Control for Chroma
[0225] A strong chroma filter is used on both sides of the block boundary. Here, the chroma filter is selected when both sides of the chroma edge are greater than or equal to 8 (chroma position), and the subsequent decision satisfies three conditions: the first condition is for the boundary strength and the decision of large blocks. The proposed filter can be applied when the block width or height orthogonal to the block edge is equal to or greater than 8 in the chroma sample domain. The second and third conditions are basically the same as those used for HEVC luma deblocking decisions, namely on / off decision and strong filter decision, respectively.
[0226] In the first decision, the boundary strength (bS) is modified for chroma filtering as shown in Table 2-2. The conditions in Table 2-2 are checked sequentially. If a condition is met, the remaining conditions with lower priority are skipped.
[0227] Chroma deblocking is performed when bS is equal to 2 or when bS is equal to 1 when a large block boundary is detected.
[0228] The second and third conditions are essentially the same as the HEVC luma strong filter decision as follows.
[0229] In the second condition: d is then derived as in HEVC luma deblocking.
[0230] When d is less than β, the second condition will be true.
[0231] In the third condition, StrongFilterCondition is derived as follows:
[0232] Derivation of dpq as in HEVC
[0233] sp3 = Abs(p3 - p0), derived as in HEVC
[0234] sq3 = Abs(q0 - q3), derived as in HEVC
[0235] As in HEVC design, StrongFilterCondition = (dpq less than (β>>2), sp3+sq3 less than (β>>3) and Abs(p0-q0) less than (5*t C +1)>>1)
[0236] 2.6.6 Strong Deblocking Filter for Chroma
[0237] Define the following strong deblocking filter for chroma:
[0238] p2′=(3*p3+2*p2+p1+p0+q0+4)>>3
[0239] p1′=(2*p3+p2+2*p1+p0+q0+q1+4)>>3
[0240] p0′=(p3+p2+p1+2*p0+q0+q1+q2+4)>>3
[0241] The proposed chroma filter performs deblocking on a 4x4 chroma sample grid.
[0242] 2.6.7 Position-dependent Clipping
[0243] Position-dependent clipping (tcPD) is applied to the output samples of the luma filtering process involving strong and long filters of 7, 5, and 3 samples at the modification boundaries. Under an assumed quantization error distribution, it is proposed to increase the clipping value for samples that are expected to have higher quantization noise and thus higher deviation of the reconstructed sample value from the true sample value.
[0244] For each P or Q boundary filtered with an asymmetric filter, a position-dependent threshold table is selected from two tables provided to the decoder as side information (i.e., Tc7 and Tc3 tabulated below), depending on the outcome of the decision-making process in Section 2.3.3:
[0245] Tc7={6,5,4,3,2,1,1};
[0246] Tc3={6,4,2};
[0247] tcPD=(Sp==3)? Tc3:Tc7;
[0248] tcQD=(Sq==3)? Tc3:Tc7;
[0249] For P or Q boundaries filtered with a short symmetric filter, a lower magnitude position-dependent threshold is applied:
[0250] Tc3={3,2,1};
[0251] After defining the threshold, the filtered p' is clipped according to the tcP and tcQ clipping values i and q' i Sample value:
[0252] p” i =Clip3(p' i +tcP i ,p' i –tcP i ,p' i );
[0253] q” j =Clip3(q' j +tcQ j ,q' j –tcQ j,q' j );
[0254] Among them, p' i and q' i is the filtered sample value, p” i and q” j is the output sample value after clipping, tcP i and tcQ i is the clipping threshold derived from the VVC tc parameters and tcPD and tcQD. Function Clip3 is the clipping function, as specified in VVC.
[0255] 2.6.8 Sub-block Deblocking Adjustment
[0256] To enable parallel, friendly deblocking using both long filters and sub-block deblocking, the long filter is restricted to modifying a maximum of 5 samples on one side using sub-block deblocking (AFFINE or ATMVP or DMVR) as shown in the luma control for the long filter. Additionally, sub-block deblocking is adjusted so that sub-block boundaries close to CU or implicit TU boundaries on the 8x8 grid are restricted to modifying only a maximum of two samples on each side.
[0257] The following applies to sub-block boundaries that are not aligned with CU boundaries.
[0258]
[0259] Where edges equal to 0 correspond to CU boundaries, edges equal to 2 or equal to orthogonalLength-2 correspond to sub-block boundaries 8 samples from a CU boundary, etc. Where implicit-TU is true if implicit partitioning of TUs is used.
[0260] 2.6.9 Luma / Chroma is limited to 4CTU / 2CTU line buffers
[0261] When the horizontal edge is aligned with the CTU boundary, the filtering of the horizontal edge is limited to Sp=3 for luma and Sp=1 and Sq=1 for chroma.
[0262] 2.7 Intra-mode encoding and decoding in VVC
[0263] To capture arbitrary edge directions present in natural videos, the number of directional intra modes in VTM5 is extended from 33 (as used in HEVC) to 65. New directional modes not in HEVC are Figure 12 Shown as red dashed arrows in , planar and DC modes remain the same. These more dense directional intra prediction modes apply to all block sizes and both luma and chroma intra prediction.
[0264] In VTM5, for non-square blocks, several conventional angular intra prediction modes are adaptively replaced by wide-angle intra prediction modes. Wide-angle intra prediction will be described in Section 3.3.1.2.
[0265] In HEVC, each intra-frame codec block has a square shape, and the length of each side is a power of 2. Therefore, when using DC mode, no split operation is required to generate the intra predictor. In VTM5, blocks can have a rectangular shape, which generally requires a split operation for each block. To avoid the split operation for DC prediction, only the longer side is used to calculate the mean of non-square blocks.
[0266] In order to keep the complexity of the most probable mode (MPM) list generation low, an intra-mode coding method with 6 MPMs is used by considering two available adjacent intra-modes. The following three aspects are considered to construct the MPM list:
[0267] 1. Default intra-frame mode
[0268] 2. Adjacent Intra Mode
[0269] 3. Derived Intra Mode
[0270] Regardless of whether MRL and ISP codecs are applied, a unified 6-MPM list is used for intra blocks. This MPM list is constructed based on the intra modes of the left and upper neighboring blocks. Assuming that the mode of the left block is denoted as Left and the mode of the upper block is denoted as Above, the unified MPM list is constructed as follows (in Figure 13 The left and upper blocks are shown in FIG).
[0271] - Defaults intra mode to planar when neighboring blocks are not available.
[0272] - If both Left and Above modes are non-angle modes:
[0273] *MP list → {plane, DC, V, H, V-4, V+4}
[0274] - If one of the modes Left and Above is an angle mode and the other is a non-angle mode:
[0275] * Set mode Max to the larger of Left and Above
[0276] *MPM list → {plane, Max, DC, Max-1, Max+1, Max-2}
[0277] - If Left and Above are both in angle mode and are different
[0278] * Set mode Max to the larger of Left and Above
[0279] *If the difference between the patterns Left and Above is in the range 2 to 62 (inclusive)
[0280] MPM list → {plane,Left,Above,DC,Max-1,Max+1}
[0281] *otherwise
[0282] MPM list → {plane,Left,Above,DC,Max-2,Max+2}
[0283] -If Left and Above are both in angle mode and are the same:
[0284] *MPM list → {plane,Left,Left-1,Left+1,DC,Left-2}
[0285] In addition, CABAC context encoding and decoding is performed on the first binary value of the mpm index codeword. A total of three contexts are used, which correspond to whether the current intra block is MRL-enabled, ISP-enabled, or a normal intra block.
[0286] During the 6MPM list generation process, pruning is used to remove repeated patterns so that only unique patterns can be included in the MPM list. For entropy coding of the 61 non-MPM modes, truncated binary code (TBC) is used.
[0287] For chroma intra mode coding and decoding, a total of 8 intra modes are allowed for chroma intra mode coding and decoding. These modes include five traditional intra modes and three cross-component linear model modes (CCLM, LM_A and LM_L). The chroma mode signaling and derivation process are shown in Table 2-4. The chroma mode coding and decoding depends directly on the intra prediction mode of the corresponding luminance block. Since separate block partitioning structures for luminance components and chrominance components are enabled in the I stripe, one chroma block can correspond to multiple luminance blocks. Therefore, for the chroma DM mode, the intra prediction mode of the corresponding luminance block covering the center position of the current chroma block is directly inherited.
[0288] Table 2-4 – Chroma prediction modes derived from luma modes when CCLM is enabled
[0289]
[0290] 2.8 Quantized Residual Block Differential Pulse Coded Modulation (QR-BDPCM)
[0291] In some embodiments, quantized residual block differential pulse codec modulation (QR-BDPCM) is proposed to efficiently encode and decode screen content.
[0292] The prediction direction used in QR-BDPCM can be vertical and horizontal prediction mode. Intra-frame prediction is performed on the entire block by copying samples in the prediction direction (horizontal or vertical prediction) similar to intra-frame prediction. The residual is quantized and the delta between the quantized residual and the quantized value of its predictor (horizontal or vertical) is encoded and decoded. This can be described as follows: For a block of size M (rows) × N (columns), let r i,j , 0≤i≤M-1,0≤j≤N-1 is the prediction residual after performing intra prediction horizontally (copying the left neighboring pixel values line by line across the prediction block) or vertically (copying the top neighboring line to every line in the prediction block) using the unfiltered samples from the upper or left block boundary samples. Let Q(r i,j ), 0≤i≤M-1,0≤j≤N-1 represents the residual r i,j The quantized version of , where the residual is the difference between the original block and the predicted block value. Then, block DPCM is applied to the quantized residual samples to obtain a value with elements The modified M×N array When signaling vertical BDPCM:
[0293]
[0294] For horizontal prediction, similar rules apply and the residual quantization samples are obtained by the following equation
[0295]
[0296] Quantize the residual samples Send to the decoder.
[0297] On the decoder side, the above calculation is reversed, yielding Q(r i,j ),0≤i≤M-1,0≤j≤N-1. For vertical prediction,
[0298]
[0299] For the horizontal case,
[0300]
[0301] The inverse quantized residual Q -1 (Q(r i,j )) is added to the intra block prediction value to generate the reconstructed sample value.
[0302] The main benefit of this approach is that inverse DPCM can be done on the fly during coefficient parsing simply by adding the predictor when the coefficients are parsed, or it can be performed after parsing.
[0303] 2.9 Adaptive Loop Filter
[0304] In VTM5, an adaptive loop filter (ALF) with block-based filter adaptation is applied.For the luma component, one of 25 filters is selected for each 4x4 block based on the direction and activity of the local gradient.
[0305] 2.9.1 Filter Shape
[0306] In VTM5, two diamond filter shapes are used (such as Figure 14 ). A 7×7 diamond shape is applied to the luma component, and a 5×5 diamond shape is applied to the chroma components.
[0307] 2.9.2 Block Classification
[0308] For the luminance component, each 4×4 block is classified into one of 25 categories. Based on its directionality D and activity The quantized value of is derived as follows:
[0309]
[0310] To calculate D and First, use the 1-D Laplacian to calculate the gradient in the horizontal, vertical, and two diagonal directions:
[0311]
[0312]
[0313]
[0314]
[0315] Wherein, the indices i and j refer to the coordinates of the upper left sample point in the 4×4 block, and R(i, j) indicates the sample point reconstructed at the coordinate (i, j).
[0316] In order to reduce the complexity of block classification, a subsampled 1-D Laplacian calculation is applied. Figure 15A As shown in -D, the same subsampling position is used for gradient calculation in all directions.
[0317] After that, the maximum and minimum values of D for the horizontal and vertical gradients are set to:
[0318]
[0319] Set the maximum and minimum values of the gradients in the two diagonal directions to:
[0320]
[0321] To derive the value of the directionality D, these values are compared with respect to each other and with two thresholds t1 and t2:
[0322] Step 1: If and If both are true, then D is set to 0.
[0323] Step 2: If Then continue with step 3; otherwise continue with step 4.
[0324] Step 3: If Then set D to 2; otherwise set D to 1.
[0325] Step 4: If Then set D to 4; otherwise set D to 3.
[0326] The activity value A is calculated as:
[0327]
[0328] A is further quantized into the range of 0 to 4 (inclusive), and the quantized value is expressed as
[0329] For the chroma components within a picture, no classification method is applied, ie, a single ALF coefficient group is applied to each chroma component.
[0330] 2.9.3. Geometric transformation of filter coefficients and clipping values
[0331] Before filtering each 4x4 luma block, geometric transformations such as rotations or diagonal and vertical flips are applied to the filter coefficients f(k,l) and the corresponding filter clipping values c(k,l) according to the gradient values calculated for the block. This is equivalent to applying these transformations to the samples within the filter support region. The idea is to make different blocks with ALF applied to them more similar by aligning their directionality.
[0332] Three geometric transformations including diagonal, vertical flip and rotation are introduced:
[0333] Diagonal: f D (k,l)=f(l,k),c D (k,l)=c(l,k), (2-9-9)
[0334] Flip vertically: f V (k,l)=f(k,Kl-1),c V (k,l)=c(k,Kl-1) (2-9-10)
[0335] Rotation: f R (k,l)=f(Kl-1,k),c R (k,l)=c(Kl-1,k) (2-9-11)
[0336] Where K is the filter size, and 0 ≤ k, l ≤ k-1 are the coefficient coordinates, such that position (0, 0) is in the upper left corner and position (k-1, k-1) is in the lower right corner. A transformation is applied to the filter coefficients f(k, l) and the cropping values c(k, l) based on the gradient values calculated for the block. The relationship between the transformation and the four gradients in the four directions is summarized in the table below.
[0337] Table 2-5 - Mapping of gradients calculated for a block to transformations
[0338] Gradient value Transform <![CDATA[g d2 <g d1 And g h <g v ]]> No transformation <![CDATA[g d2 <g d1 And g v <g h ]]> diagonal <![CDATA[g d1 <g d2 And g h <g v ]]> Flip vertically <![CDATA[g d1 <g d2 And g v <g h ]]> Rotation
[0339] 2.9.4 Filter Parameter Signaling
[0340] In VTM5, ALF filter parameters are signaled in Adaptive Parameter Sets (APSs). In one APS, up to 25 sets of luma filter coefficients and clipping value indices and up to one set of chroma filter coefficients and clipping value indices can be signaled. To reduce bit overhead, filter coefficients from different categories can be merged. The index of the APS for the current slice is signaled in the slice header.
[0341] The clipping value index decoded from the APS allows the clipping value to be determined using the clipping value table for luma and the clipping value table for chroma. These clipping values depend on the internal bit depth. More specifically, the clipping value table for luma and the clipping value table for chroma are obtained by the following formulas:
[0342]
[0343]
[0344] Where B is equal to the internal bit depth and N is equal to 4, which is the number of cropping values allowed in VTM5.0.
[0345] The filtering process can be controlled at the CTB level. A flag is always signaled to indicate whether the ALF is applied to the luma CTB. The luma CTB can select a filter set from 16 fixed filter sets and a filter set from the APS. A filter set index is signaled for the luma CTB to indicate which filter set to apply. These 16 fixed filter sets are predefined and hard-coded into both the encoder and decoder.
[0346] The filter coefficients are quantized with a norm equal to 128. To limit the multiplication complexity, bitstream consistency is applied so that coefficient values in non-central positions must be in the range -2 7 to 2 7 -1 inclusive. The center position coefficient is not signaled in the bitstream and is assumed to be equal to 128.
[0347] 2.9.5 Filtering process
[0348] At the decoder side, when ALF is enabled for CTB, each sample point R(i,j) in the CU is filtered to obtain the sample value R′(i,j) as shown below,
[0349] R′(i,j)=R(i,j)+((∑ k≠0 ∑ l≠0 f(k,l)×K(R(i+k,j+l)-R(i,j),c(k,l))+64)>>7) (2-9-14)
[0350] Where f(k, l) represents the decoded filter coefficients, K(x, y) is the clipping function, and c(k, l) represents the decoded clipping parameters. The variables k and l are in and where L represents the filter length. The clipping function K(x,y)=min(y,max(-y,x)) corresponds to the function Clip3(-y,y,x).
[0351] 2.9.6 Implementing Virtual Boundary Filtering for Line Buffer Reduction
[0352] In VTM5, in order to reduce the line buffer requirements of the ALF, modified block classification and filtering are used for samples near the horizontal CTU boundary. For this purpose, a virtual boundary is defined as a line obtained by shifting the horizontal CTU boundary by "N" samples, such as Figure 16 As shown, where N is equal to 4 for the luma component and N is equal to 2 for the chroma components.
[0353] Applying a modified block classification to the luminance component, such as Figure 2-11. For the 1D Laplacian gradient computation of the 4x4 block above the virtual boundary, only the samples above the virtual boundary are used. Similarly, for the 1D Laplacian gradient computation of the 4x4 block below the virtual boundary, only the samples below the virtual boundary are used. By taking into account the reduced number of samples used in the 1D Laplacian gradient computation, the quantization of the activity value A is scaled accordingly.
[0354] For the filtering process, a symmetric padding operation at the virtual boundary is used for both the luma and chroma components. Figure 17 As shown in FIG, when the sample point being filtered is below the virtual boundary, the adjacent sample points above the virtual boundary are filled in. At the same time, the corresponding sample points on the other side are also symmetrically filled in.
[0355] 2.10 Sample Adaptive Offset (SAO)
[0356] Sample Adaptive Offset (SAO) is applied to the reconstructed signal after the deblocking filter using an offset specified by the encoder for each CTB. The HM encoder first decides whether to apply the SAO process to the current slice. If SAO is applied to the slice, each CTB is classified into one of five SAO types, as shown in Tables 2-6. The concept of SAO is to classify pixels into categories and reduce distortion by adding an offset to the pixels in each category. SAO operations include edge offset (EO) in SAO types 1-4, which uses edge features to classify pixels, and band offset (BO) in SAO type 5, which uses pixel intensity to classify pixels. Each applicable CTB has SAO parameters including sao_merge_left_flag, sao_merge_up_flag, SAO type, and four offsets. If sao_merge_left_flag is 1, the current CTB reuses the SAO type and offset of the CTB to the left. If sao_merge_up_flag is 1, the current CTB reuses the SAO type and offset of the CTB above it.
[0357] Table 2-6 – Specifications of SAO types
[0358]
[0359] 2.10.1. Operations per SAO Type
[0360] Edge offset classifies the current pixel p using four 1-D 3-pixel patterns by considering edge direction information, as Figure 18 From left to right these patterns are: 0 degrees, 90 degrees, 135 degrees, and 45 degrees.
[0361] Each CTB was classified into one of five categories according to Tables 2-7.
[0362] Table 2-7 – EO pixel classification rules
[0363]
[0364]
[0365] Band Offset (BO) classifies all pixels in a CTB region into 32 uniform bands by using the five most significant bits of the pixel value as the band index. In other words, the pixel intensity range is divided into 32 equal segments from zero to the maximum intensity value (e.g., 255 for 8-bit pixels). Four adjacent bands are clustered together, and each group is indicated by the leftmost position of each group, as shown in Figure 1. Figure 19 The encoder searches all positions to obtain the group with the greatest distortion reduction by compensating for the offset of each band.
[0366] 2.11 Combined Inter- and Intra-frame Prediction (CIIP)
[0367] In VTM5, when encoding and decoding a CU in merge mode, if the CU includes at least 64 luma samples (that is, the CU width multiplied by the CU height is equal to or greater than 64), and if both the CU width and the CU height are less than 128 luma samples, an additional flag is signaled to indicate whether to apply the combined inter / intra prediction (CIIP) mode to the current CU. As its name indicates, CIIP prediction combines the inter prediction signal with the intra prediction signal. The inter prediction signal P in CIIP mode inter is derived using the same inter-frame prediction process as applied to the conventional merge mode; and the intra-frame prediction signal P intra is derived following the conventional intra prediction process using planar mode. The intra prediction signal and the inter prediction signal are then combined using a weighted average, where the weights are calculated based on the top and left neighboring blocks ( Figure 20 The weight value is calculated based on the encoding and decoding mode shown in :
[0368] - If the top neighboring block is available and is intra-coded, then set isIntraTop to 1, otherwise set isIntraTop to 0;
[0369] - If the left neighboring block is available and is intra-coded, then set isIntraLeft to 1, otherwise set isIntraLeft to 0;
[0370] -If (isIntraLeft + isIntraLeft) is equal to 2, then set wt to 3;
[0371] - Otherwise, if (isIntraLeft + isIntraLeft) is equal to 1, then set wt to 2;
[0372] Otherwise, set wt to 1.
[0373] The CIIP forecast is formed as follows:
[0374] P CIIP =((4-wt)*P inter +wt*P intra +2)>>2 (3-1)
[0375] 2.12 Luminance Mapping with Chroma Scaling (LMCS)
[0376] In VTM5, a codec tool called Luma Mapping with Chroma Scaling (LMCS) was added as a new processing block before the loop filter. LMCS has two main components: 1) loop mapping of the luma component based on an adaptive piecewise linear model; 2) for the chroma components, luma-dependent chroma residual scaling is applied. Figure 21 The LMCS architecture is shown from a decoder perspective. Figure 21 The light blue shaded blocks in indicate where the processing is applied in the mapped domain; and these include inverse quantization, inverse transform, luma intra prediction, and adding the luma prediction to the luma residual. Figure 21 The unshaded blocks in indicate where the processing is applied in the original (i.e., unmapped) domain; and these include loop filters such as deblocking, ALF and SAO, motion compensated prediction, chroma intra prediction, adding the chroma prediction to the chroma residual, and storing the decoded picture as a reference picture. Figure 21 The light yellow shaded block in the figure is the new LMCS functional block, which includes the forward and inverse mapping of the luma signal and the chroma scaling process that depends on the luma. Like most other tools in VVC, LMCS can be enabled / disabled at the sequence level using the SPS flag.
[0377] 3. Examples of Problems Solved by the Embodiments
[0378] A palette flag is usually used to indicate whether a palette mode that may impose different restrictions and changes on the entropy encoding and decoding of the current CU is adopted. However, in previous video coding standards, how to better encode and decode the palette flag has not been comprehensively studied.
[0379] If the palette samples are processed through a post-loop filtering process, the palette samples may have visual artifacts.
[0380] The palette scan order can be improved for non-square blocks.
[0381] 4. Examples of Embodiments
[0382] The inventions described in detail below should be considered as examples to explain the general concept. These inventions should not be interpreted narrowly. In addition, these aspects can be combined in any way.
[0383] 1. The indication of the palette mode used for a transform unit / prediction unit / codec block / region can be coded independently of the prediction mode.
[0384] a. In one example, the prediction mode may be encoded before the indication of the use of the palette.
[0385] i. Alternatively, furthermore, the indication of the use of the palette may be signaled conditionally based on the prediction mode.
[0386] 1. In one example, when the prediction mode is intra block copy mode (i.e., MODE_IBC), signaling of an indication of the use of a palette mode may be skipped. Alternatively, furthermore, when the current prediction mode is MODE_IBC, the indication of the use of a palette may be inferred to be false.
[0387] 2. In one example, when the prediction mode is inter mode (i.e., MODE_INTER), the signaling of the indication of the use of palette mode may be skipped. Alternatively, furthermore, when the current prediction mode is MODE_INTER, the indication of the use of palette mode may be inferred to be false.
[0388] 3. In one example, when the prediction mode is intra mode (ie, MODE_INTRA), the signaling of the indication of the use of the palette mode may be skipped. Alternatively, furthermore, when the current prediction mode is MODE_INTRA, the indication of the use of the palette may be inferred to be false.
[0389] 4. In one example, when the prediction mode is skip mode (i.e., the skip flag is equal to 1), the signaling of the indication of the use of palette mode can be skipped. Alternatively, when skip mode is adopted for the current CU, the indication of the use of palette mode can be inferred to be false.
[0390] 5. In one example, when the prediction mode is intra mode (e.g., MODE_INTRA), the use of palette mode may be signaled. Alternatively, when the prediction mode is inter mode or intra block copy mode, the signaling of the use of palette mode may be skipped.
[0391] a) Alternatively, furthermore, when the prediction mode is intra mode and not pulse code modulation (PCM) mode, an indication of the use of palette mode may be signaled.
[0392] b) Alternatively, furthermore, when the prediction mode is intra mode, the indication of the use of palette mode may be signaled before the indication of the use of PCM mode. In one example, when palette mode is applied, the signaling of the use of PCM mode may be skipped.
[0393] c) Alternatively, furthermore, when the prediction mode is inter mode or intra block copy mode, the signaling of the indication of the use of palette mode may be skipped.
[0394] 6. In one example, when the prediction mode is inter mode (eg, MODE_INTER), an indication of the use of palette mode may be signaled.
[0395] a) Alternatively, when the prediction mode is intra mode, the signaling of the indication of the use of palette mode may be skipped.
[0396] 7. In one example, when the prediction mode is intra block copy mode, an indication of the use of palette mode may be signaled. Alternatively, furthermore, when the prediction mode is inter mode or intra mode, the signaling of the indication of the use of palette mode may be skipped.
[0397] ii. Alternatively, in addition, the indication of the use of palette mode may be conditionally signaled based on the picture / slice / slice group type.
[0398] b. In one example, the prediction mode may be encoded or decoded following the indication of the use of the palette mode.
[0399] c. In one example, when the prediction mode is INTRA mode or INTER_MODE, an indication of the use of palette mode may be signaled.
[0400] i. In one example, the indication of the use of palette mode may be encoded after the skip flag, the prediction mode, and the PCM mode flag.
[0401] ii. In one example, the indication of the use of palette mode may be encoded after the skip flag, the prediction mode, and before the flag for PCM mode.
[0402] iii. In one example, when the current block adopts intra-frame mode encoding and decoding, the palette mode and IBC mode indication may be further signaled.
[0403] 1. In one example, a one-bit flag may be signaled to indicate whether palette or IBC mode is being signaled.
[0404] 2. In one example, signaling of this bit flag can be skipped under certain conditions, such as block dimension, whether IBC mode or palette mode is enabled for a slice / slice group / slice / picture / sequence.
[0405] d. In one example, the prediction mode may be encoded first (eg, whether it is intra or inter), and then conditionally signaled whether it is a palette mode.
[0406] i. In one example, when the prediction mode is intra mode, another flag may be further signaled to indicate whether it is a palette mode.
[0407] 1. In one example, when palette mode is enabled for a video data unit (eg, sequence / picture / slice group / slice), the "another flag" may be signaled.
[0408] 2. In one example, the "another flag" may be signaled based on block-dimensional conditions.
[0409] 3. Alternatively, in addition, if it is not palette mode, a flag may be further signaled to indicate whether it is PCM mode.
[0410] 4. In one example, the "another flag" may be context-coded based on information about neighboring blocks. Alternatively, the "another flag" may be context-coded using only one context. Alternatively, the "another flag" may be bypass-coded, i.e., without a context.
[0411] ii. Alternatively, when the prediction mode is inter mode, another flag may be further signaled to indicate whether it is IBC mode.
[0412] 1. In one example, when the IBC mode is enabled for a video data unit (eg, sequence / picture / slice group / slice), the “another flag” may be signaled.
[0413] 2. In one example, the "another flag" may be signaled based on block-dimensional conditions.
[0414] 2. It is proposed to add palette mode as an additional prediction mode candidate. Therefore, there is no need to signal the use of palette mode independently from the prediction mode.
[0415] a. In one example, the prediction mode may include intra mode, intra block copy mode, and palette mode for intra slice / I picture / intra slice group.
[0416] b. Alternatively, the prediction mode may include intra mode, palette mode for intra slice / I picture / intra slice group.
[0417] c. In one example, prediction modes may include intra mode, intra block copy mode, and palette mode for 4x4 blocks.
[0418] d. In one example, the prediction modes may include intra mode, inter mode, intra block copy mode, and palette mode for inter slices / P and / or B pictures / inter slice groups.
[0419] e. In one example, the prediction modes may include intra mode, inter mode, intra block copy mode for inter slice / P and / or B picture / inter slice group.
[0420] f. Alternatively, the prediction mode may include at least two of an intra mode, an inter mode, an intra block copy mode, and a palette mode.
[0421] g. In one example, inter mode may not be included in the prediction mode for a 4x4 block.
[0422] h. In one example, the prediction mode index may be signaled when the block is not coded as in skip mode (which is a special case of inter mode).
[0423] i. In one example, four modes of binarization are defined: Intra (1), Inter (00), IBC (010), and Palette (011).
[0424] ii. In one example, four modes of binarization are defined as: intra (10), inter (00), IBC (01), and palette (11), as shown in Figure 10 shown.
[0425] iii. In one example, if the current slice is an intra slice and IBC is not enabled in the SPS, the binarization of palette mode and intra mode is defined as: palette (1) and intra (0).
[0426] iv. In one example, if the current slice is not an intra slice and IBC is not enabled in the SPS, the palette mode, inter mode, and binarization of intra mode are defined as: intra (1), inter (00), and palette (01).
[0427] v. In one example, if the current slice is an intra slice and IBC is enabled in the SPS, the binarization of palette mode and intra mode is defined as: IBC (1), palette (01) and intra (00).
[0428] vi. In one example, four modes of binarization are defined as: inter (1), intra (01), IBC (001), and palette (000).
[0429] vii. In one example, four modes of binarization are defined as: intra (1), inter (01), IBC (001), and palette (000).
[0430] viii. In one example, four modes of binarization are defined as: inter (0), intra (10), IBC (111), and palette (110), as shown in FIG. Figure 11 shown.
[0431] 3. Signaling of indication of use of palette / IBC mode may depend on information of other modes.
[0432] a. In one example, when the prediction mode is intra mode and not IBC mode, an indication of the use of palette mode may be signaled.
[0433] b. In one example, when the current prediction mode is intra mode and not palette mode, an indication of the use of IBC mode may be signaled.
[0434] 4. How to signal the mode information may depend on the slice / picture / slice group type.
[0435] In one example, when the mode is I slice / intra slice group, a flag may be signaled to indicate whether the mode is IBC. If the mode is not IBC, another flag may be further signaled to indicate whether the mode is palette mode or intra mode.
[0436] b. In one example, when the mode is I slice / intra slice group, a flag may be signaled to indicate whether it is intra mode. If it is not intra mode, another flag may be further signaled to indicate whether it is palette mode or IBC mode.
[0437] 5. The indication of the use of palette mode may be signaled and / or derived based on the following conditions.
[0438] a. The block dimension of the current block
[0439] i. In one example, the indication of the use of palette mode may be signaled only for blocks having a width*height less than or equal to a threshold (eg, 64*64).
[0440] ii. In one example, the indication of the use of palette mode may be signaled only for blocks whose width and height are both greater than or equal to a threshold (eg, 64).
[0441] iii. In one example, the indication of the use of palette mode may be signaled only for blocks for which all of the following conditions are true:
[0442] 1. The width and / or height is greater than or equal to a threshold (e.g., 16);
[0443] 2. Width and / or height is less than or equal to a threshold (such as 32 or 64)
[0444] iv. In one example, the indication of the use of palette mode may be signaled only for blocks having a width equal to the height (e.g., square blocks)
[0445] b. Prediction mode of the current block
[0446] c. Current quantization parameter of the current block
[0447] d. Palette flags for adjacent blocks
[0448] e. Intra-block copy flag of adjacent blocks
[0449] f. Indication of color format (such as 4:2:0, 4:4:4)
[0450] g. Single / dual codec tree structure
[0451] h. Slice / slice group type and / or picture type
[0452] 6. The indication of the use of IBC mode may be signaled and / or derived based on the following conditions.
[0453] a. The block dimension of the current block
[0454] i. In one example, the indication of the use of palette mode may be signaled only for blocks having a width and height both less than 128
[0455] b. Prediction mode of the current block
[0456] c. Current quantization parameter of the current block
[0457] d. Palette flags for adjacent blocks
[0458] e. Intra-block copy flag of adjacent blocks
[0459] f. Indication of color format (such as 4:2:0, 4:4:4)
[0460] g. Single / dual codec tree structure
[0461] h. Slice / slice group type and / or picture type
[0462] 7. The palette mode can be treated as an intra mode (e.g., MODE_INTRA) in the deblocking decision process.
[0463] a. In one example, if the samples on the p-side or q-side are encoded using palette mode, the boundary strength is set to 2.
[0464] b. In one example, if the samples on both the p-side and the q-side are encoded and decoded using palette mode, the boundary strength is set to 2.
[0465] c. Alternatively, the palette mode can be treated as an inter mode (e.g., MODE_INTER) in the deblocking decision process.
[0466] 8. The palette mode can be treated as a separate mode (e.g., MODE_PLT) in the deblocking decision process.
[0467] a. In one example, if the samples on the p-side and q-side are encoded using palette mode, the boundary strength is set to 0.
[0468] i. Alternatively, if the samples on one side are coded using palette mode, set the border strength to 0.
[0469] b. In one example, if the samples on the p side are coded in IBC mode and the samples on the q side are coded in palette mode, then the boundary strength is set to 1, and vice versa.
[0470] c. In one example, if the samples on the p side are coded in intra mode and the samples on the q side are coded in palette mode, then the boundary strength is set to 2, and vice versa.
[0471] 9. Palette modes can be treated as transform skip blocks in the deblocking decision process.
[0472] a. Alternatively, palette patterns can be treated as BDPCM blocks in the deblocking decision process.
[0473] 10. The indication of palette mode used for a block may be signaled and / or derived based on slice / slice group / picture level flags.
[0474] a. In one example, this flag indicates whether fractional motion vector differences (MVD) are allowed in merge with motion vector differences (MMVD, also known as UMVE) and / or adaptive motion vector resolution (AMVR) modes (e.g., slice_fracmmvd_flag). Alternatively, if slice_fracmmvd_flag indicates that fractional MVD is enabled, signaling of the use indication of palette mode is skipped and palette mode is inferred to be disabled.
[0475] b. In one example, the flag indicates whether palette mode is enabled for the slice / slice group / picture. Alternatively, when such a flag indicates that palette mode is disabled, signaling indicating that palette mode is used for the block is skipped and palette mode is inferred to be disabled.
[0476] 11. The indication of using intra block copy mode (IBC) for a block may be signaled and / or derived based on slice / slice group / picture level flags.
[0477] a. In one example, this flag indicates whether fractional motion vector difference (MVD) is allowed in merge with motion vector difference (MMVD, also known as UMVE) and / or adaptive motion vector resolution (AMVR) mode (e.g., slice_fracmmvd_flag). Alternatively, if slice_fracmmvd_flag indicates that fractional MVD is enabled, then signaling of the use indication of IBC mode is skipped and IBC mode is inferred to be disabled.
[0478] b. In one example, the flag indicates whether IBC mode is enabled for a slice / slice group / picture. Alternatively, when such a flag indicates that IBC mode is disabled, signaling indicating that IBC mode is used for the block is skipped and IBC mode is inferred to be disabled.
[0479] 12. The samples associated with a palette entry may have a bit depth that is different from the internal bit depth and / or the bit depth of the original / reconstructed samples.
[0480] a. In one example, representing that the samples associated with a may have a bit depth equal to N, then the following may apply:
[0481] i. In one example, N can be an integer (eg, 8).
[0482] ii. In one example, N may be greater than the internal bit depth and / or the bit depth of the original / reconstructed samples.
[0483] iii. In one example, N can be less than the internal bit depth and / or the bit depth of the original / reconstructed samples.
[0484] iv. In one example, N can depend on
[0485] 1. The block dimension of the current block
[0486] 2. The current quantization parameter of the current block
[0487] 3. An indication of the color format (such as 4:2:0, 4:4:4)
[0488] 4. Separate / double codec tree structure
[0489] 5. The stripe / slice group type and / or picture type
[0490] 6. The number of palette entries
[0491] 7. The number of predicted palette entries
[0492] 8. The index of the color component
[0493] b. In one example, samples associated with multiple palette entries can have different bit depths.
[0494] i. In one example, let C0 and C1 be two palette entries in the current palette, and they have bit depths equal to b0 and b1 respectively. b0 can be not equal to b1.
[0495] 1. In one example, b0 can be greater than / less than the internal bit depth and / or the bit depth of the original / reconstructed samples, and / or b1 can be greater than / less than the internal bit depth and / or the bit depth of the original / reconstructed samples. c. In one example, in the palette mode, samples can be reconstructed according to the shift value of the samples associated with the palette entries.
[0496] i. In one example, samples can be reconstructed by shifting the samples in the palette entry left by M bits.
[0497] ii. In one example, the reconstructed value can be (C << M)+(1 << (M - 1)), where C is the palette entry.
[0498] iii. In one example, samples can be reconstructed by shifting the samples in the palette entry right by M bits.
[0499] iv. In one example, the reconstructed value can be clip((C+(1 << (M - 1))) >> M, 0, (1 << N)-1), where C is the palette entry, and N is the reconstructed bit depth.
[0500] v. Alternatively, furthermore, in one example, M may depend on the bit depth difference between the samples associated with the palette entry and the internal bit depth of the reconstructed / original samples.
[0501] 1. In one example, M may be equal to the internal bit depth minus the bit depth of the samples in the palette entry.
[0502] 2. In one example, M may be equal to the bit depth of the samples in the palette entry minus the internal bit depth.
[0503] 3. In one example, M may be equal to the bit depth of the original samples minus the bit depth of the samples in the palette entry.
[0504] 4. In one example, M can be equal to the bit depth in the palette entry minus the bit depth of the original sample.
[0505] 5. In one example, M may be equal to the bit depth of the reconstructed samples minus the bit depth of the samples in the palette entry.
[0506] 6. In one example, M may be equal to the bit depth of the samples in the palette entry minus the bit depth of the reconstructed samples.
[0507] vi. In one example, M can be an integer (eg, 2).
[0508] vii. Alternatively, in addition, in one example, M may depend on
[0509] 1. The block dimension of the current block
[0510] 2. Current quantization parameter of the current block
[0511] 3. Indication of color format (such as 4:2:0, 4:4:4)
[0512] 4. Single / Dual Codec Tree Structure
[0513] 5. Strip / slice group type and / or picture type
[0514] 6. Number of palette entries
[0515] 7. Predict the number of palette entries
[0516] 8. Sample location in block / picture / strip / slice
[0517] 9. Color component index
[0518] viii. In one example, a lookup operation based on samples in palette entries may be used during reconstruction of the samples.
[0519] 1. In one example, the value in the lookup table may be signaled within a group of sequence parameter set (SPS) / video parameter set (VPS) / picture parameter set (PPS) / picture header / slice header / slice group header / LCU row / LCU.
[0520] 2. In one example, the values in the lookup table may be inferred within the group of SPS / VPS / PPS / picture header / slice header / slice group header / LCU row / LCU.
[0521] 13. The signaled / derived quantization parameter (QP) of the block used for palette coding may be modified first and then used to derive the outgoing pixels / samples, e.g. to clip them.
[0522] a. In one example, the QP range applied to palette-coded blocks may be treated in the same manner as transform skip mode and / or BDPCM mode.
[0523] b. In one example, the QP applied to a palette-coded block may be revised to max(Qp, 4+T), where T is an integer value and Qp is the signaled or derived quantization parameter for the block.
[0524] i. In one example, T may be a predefined threshold.
[0525] ii. In one example, T may be equal to (4+min_qp_prime_ts_minus4), where min_qp_prime_ts_minus4 may be signaled.
[0526] 14. How to encode and decode escaped samples / symbols can be unified regardless of whether transform quantization bypass is enabled.
[0527] a. In one example, fixed-length signaling may be used to notify the escaped sample points.
[0528] b. In one example, the escaped samples may be signaled according to a fixed length using N bits.
[0529] i. In one example, N can be an integer (e.g., 8 or 10) and can depend on
[0530] 1. Messages signaled in SPS / VPS / PPS / picture header / slice header / slice group header / LCU row / LCU group.
[0531] 2. Internal bit depth
[0532] 3. Input bit depth
[0533] 4. Block dimensions of the current block
[0534] 5. Current quantization parameter of the current block
[0535] 6. Indication of color format (such as 4:2:0, 4:4:4)
[0536] 7. Single / Dual Codec Tree Structure
[0537] 8. Strip / slice group type and / or picture type
[0538] c. In one example, the code length for signaling outgoing pixels / samples may depend on the internal bit depth.
[0539] i. Alternatively, the code length for signaling outgoing pixels / samples may depend on the input bit depth.
[0540] d. In one example, the code length for signaling outgoing pixels / samples may depend on the quantization parameter.
[0541] i. In one example, the code length used to signal outgoing pixels / samples may be f(Qp)
[0542] 1. In one example, the function f may be defined as (internal bit depth - (Qp - 4) / 6).
[0543] 15. The quantization and / or inverse quantization process of palette codec blocks and non-palette codec blocks can be defined in different ways.
[0544] a. In one example, right bit shifting can be used to quantize outgoing samples without using the quantization process for transform coefficients or residuals.
[0545] b. In one example, left bit shifting can be used to inverse quantize escaped samples without using the inverse quantization process for transform coefficients or residuals.
[0546] c. On the encoder side, the following applies:
[0547] i. In one example, the outgoing pixel / sample value may be signaled as f(p, Qp), where p is the pixel / sample value.
[0548] ii. In one example, the function f may be defined as p>>((Qp-4) / 6), where p is the pixel / sample value and Qp is the quantization parameter.
[0549] iii. In one example, the outgoing pixel / sample values may be signaled as p>>N, where p is the pixel / sample value.
[0550] 1. In one example, N can be an integer (e.g., 2) and can depend on
[0551] a) Messages signaled in SPS / VPS / PPS / picture header / slice header / slice group header / LCU row / LCU group.
[0552] b) Internal bit depth
[0553] c) Input bit depth
[0554] d) The block dimension of the current block
[0555] e) The current quantization parameter of the current block
[0556] f) Indication of color format (such as 4:2:0, 4:4:4)
[0557] g) Single / dual codec tree structure
[0558] h) Slice / slice group type and / or picture type
[0559] d. On the decoder side, the following may be applied:
[0560] i. In one example, the outgoing pixel / sample value can be signaled as f(bd,p,Qp)
[0561] 1. In one example, the function f can be defined as clip(0,(1<<(bd-(Qp-4) / 6))-1,(p+(1<<(bd-1)))>>((Qp-4) / 6)).
[0562] ii. In one example, the escaped pixel / sample value can be reconstructed as f(p, Qp), where p is the decoded pixel / sample value.
[0563] 1. In one example, f can be defined as p << ((Qp-4) / 6)
[0564] iii. In one example, the escaped pixel / sample value can be reconstructed as f(bd, p, Qp), where p is the decoded pixel / sample value.
[0565] 1. In an example, the function clip can be defined as clip(0,(1< <bd)-1,p<<((Qp-4) / 6))
[0566] iv. In the above example, the clip function clip(a,i,b) can be defined as (i<a?a:(i> b? b:i)).
[0567] v. In the above example, the clip function clip(a,i,b) can be defined as (i<=a?a:(i>=b?b:i)).
[0568] vi. In the above examples, p may be the pixel / sample value, bd may be the internal bit depth or the input bit depth, and Qp is the quantization parameter.
[0569] 16. Palette-coded blocks may be treated as intra blocks during the Most Probable Mode (MPM) list building process (eg, MODE_INTRA).
[0570] a. In one example, when retrieving the intra modes of neighboring (adjacent or non-neighboring) blocks during construction of the MPM list, if the neighboring blocks (e.g., left and / or above) are coded using palette mode, they can be treated as regular intra-coded blocks using the default mode (e.g., MODE_INTRA).
[0571] i. In one example, the default mode may be DC / PLANAR / VER / HOR mode.
[0572] ii. In one example, the default mode may be any intra prediction mode.
[0573] iii. In one example, the default mode may be signaled in dependency parameter set (DPS) / SPS / VPS / PPS / APS / picture header / slice header / slice group header / largest codec unit (LCU) / codec unit (CU) / LCU row / LCU group / TU / PU block / video codec unit.
[0574] 17. Palette-coded blocks may be treated as non-intra blocks (eg, as blocks employing a prediction mode equal to MODE_PLT) during the most probable mode (MPM) list construction process.
[0575] a. In one example, when retrieving the intra modes of neighboring blocks during construction of the MPM list, if the neighboring blocks (e.g., to the left and / or above) are coded in palette mode, they may be treated the same or similarly to those blocks coded in inter mode.
[0576] b. In one example, when retrieving the intra modes of neighboring blocks during construction of the MPM list, if the neighboring blocks (e.g., to the left and / or above) are encoded in palette mode, they can be treated in the same or similar manner as those blocks encoded in IBC mode.
[0577] 18. The luminance block coded and decoded in palette mode corresponding to the chrominance block coded and decoded in DM mode can be understood as having the default intra prediction mode.
[0578] a. In one example, when a chroma block is coded in DM mode, the corresponding luma block coded in palette mode can be treated as an intra block (eg, MODE_INTRA) or a palette (eg, MODE_PLT) block.
[0579] b. In one example, the default prediction mode may be DC / PLANAR / VER / HOR mode.
[0580] c. In one example, the default prediction mode may be any intra prediction mode.
[0581] d. In one example, the default prediction mode may be signaled in a DPS / SPS / VPS / PPS / APS / picture header / slice header / slice group header / largest codec unit (LCU) / codec unit (CU) / LCU row / LCU group / TU / PU block / video codec unit.
[0582] 19. Palette-coded blocks may be treated as unavailable blocks during list construction in history-based motion vector prediction (HMVP) mode, merge (MERGE) mode, and / or advanced motion vector prediction (AMVP) mode.
[0583] a. In one example, an unavailable block may refer to a block that does not have any motion information or whose motion information cannot be used for prediction of other blocks.
[0584] b. In one example, during the list construction process in HMVP mode, MERGE mode and / or AMVP mode, blocks encoded and decoded using palette mode can be treated as intra blocks (e.g., MODE_INTRA) or palette (e.g., MODE_PLT) blocks.
[0585] i. Alternatively, in one example, when retrieving motion information of neighboring blocks during construction of HMVP, MERGE, and / or AMVP lists, neighboring blocks coded in palette mode may be treated as blocks with invalid reference indices.
[0586] ii. Alternatively, in one example, when retrieving motion information of neighboring blocks during construction of HMVP, MERGE, and / or AMVP lists, neighboring blocks coded in palette mode may be treated as inter blocks with reference index equal to 0.
[0587] iii. Alternatively, in one example, when retrieving motion information of neighboring blocks during list construction in HMVP, MERGE, and / or AMVP modes, neighboring blocks coded in palette mode may be treated as inter blocks with zero motion vectors.
[0588] 20. How to treat blocks encoded in palette mode (e.g., whether and / or how to apply the above method) may depend on
[0589] a. Video content (e.g., screen content or natural content)
[0590] b. Messages signaled in DPS / SPS / VPS / PPS / APS / picture header / slice header / slice group header / largest codec unit (LCU) / codec unit (CU) / LCU row / LCU group / TU / PU block / video codec unit
[0591] c. Location of CU / PU / TU / block / video codec unit
[0592] d. Block size of the current block and / or its neighboring blocks
[0593] e. Block shape of the current block and / or its neighboring blocks
[0594] f. Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV)
[0595] g. Codec tree structure (such as dual tree or single tree)
[0596] h. Slice / slice group type and / or picture type
[0597] i. Color components (e.g., may apply only to luma or chroma components)
[0598] j. Time domain layer ID
[0599] k. Standard grade / level / level
[0600] 21. The context codec bins of blocks used for palette coding can be restricted to be within a certain range.
[0601] In one example, a counter is assigned to a block to record how many binary numbers have been context-coded. When the counter exceeds a threshold, bypass coding is applied without using context coding.
[0602] i. Alternatively, a NumColorComp counter may be allocated to record how many binary numbers have been context-encoded for each color component. NumColorComp is the number of color components to be decoded in a block (e.g., for a CU with a YUV format, NumColorComp is set to 3).
[0603] ii. Alternatively, the counter may be initialized to zero and incremented by one after encoding or decoding a binary number using the context.
[0604] b. Alternatively, a counter may be initialized with a value greater than zero (e.g., W*H*K), and after encoding and decoding a binary number using the context, the counter is decremented by 1. When the counter is less than or equal to T, bypass encoding and decoding is applied without using context encoding and decoding.
[0605] i. In one example, T is set to 0 or 1.
[0606] ii. In one example, T is set according to the decoded information or the number of encoding and decoding processes.
[0607] c. In one example, palette-coded blocks may have the same or different thresholds than TS-coded blocks or non-TS-coded blocks in terms of context-coded bins.
[0608] i. In one example, the number of context encoding bins for a palette-encoded block can be set to (W*H*T), where W and H are the width and height of a block, respectively, and T is an integer. In one example, T is set to the same as T for a TS-encoded block, such as 1.75 or 2.
[0609] ii. In one example, the number of context encoding bins for a block for palette encoding can be set to (W*H*NumColorComp*T), where W and H are the width and height of a block, NumColorComp is the number of color components to be encoded in a block (for example, for a CU in YUV format, NumColorComp is set to 3), and T is an integer. In one example, T is set to the same as T for a block for TS encoding, such as 1.75 or 2.
[0610] d. In one example, with respect to the context-coded binary number, the threshold value of the palette-coded block may be smaller than the threshold value of the TS-coded block or the non-TS-coded block.
[0611] e. In one example, with respect to the context-coded binary number, the threshold value of the palette-coded block may be greater than the threshold value of the TS-coded block or the non-TS-coded block.
[0612] 22. Palette-coded blocks may be treated as non-intra blocks (eg, as blocks employing a prediction mode equal to MODE_PLT) during the process of counting neighboring intra blocks in CIIP mode.
[0613] a. In one example, when retrieving the intra mode of a neighboring block during counting of neighboring intra blocks in CIIP mode, if the neighboring blocks (e.g., to the left and / or above) are coded in palette mode, they may be treated the same or similarly to those coded in inter mode.
[0614] b. In one example, when retrieving the intra mode of a neighboring block during counting of neighboring intra blocks in CIIP mode, if the neighboring blocks (e.g., to the left and / or above) are coded in palette mode, they may be treated the same or similarly to those coded in IBC mode.
[0615] c. Alternatively, palette-coded blocks may be treated as intra blocks during the process of counting adjacent intra blocks in CIIP mode.
[0616] 23. It is proposed to skip the pre-filtering and / or post-filtering process for samples of palette encoding and decoding.
[0617] a. In one example, palette-encoded samples may not be deblocked.
[0618] b. In one example, the palette-encoded samples may not be offset compensated in the SAO process.
[0619] c. In one example, palette-encoded samples may not be filtered in the ALF process.
[0620] i. In one example, classification in the ALF process can skip samples of palette encoding and decoding.
[0621] d. In one example, LMCS can be disabled for palette-encoded samples.
[0622] 24. Proposed to add more scanning orders in palette mode.
[0623] a. In one example, a reverse horizontal traversal scan order may be used as defined below.
[0624] i. In one example, the scan direction of odd-numbered rows may be from left to right.
[0625] ii. In one example, the scanning direction of even-numbered rows may be from right to left.
[0626] iii. In one example, the scanning order of 4x4 blocks can be as follows Figure 22 As shown in .
[0627] b. In one example, a reverse vertical traversal scan order may be used as defined below.
[0628] i. In one example, the scanning direction of odd-numbered columns may be from top to bottom.
[0629] ii. In one example, the scanning direction of even-numbered columns may be from bottom to top.
[0630] iii. In one example, the scanning order of 4x4 blocks can be as follows Figure 23 As shown in .
[0631] 25. The allowed combinations of scan orders may depend on the block shape.
[0632] a. In one example, when the ratio of the width to the height of the block is greater than a threshold, the horizontal traversal and reverse horizontal traversal scanning orders may only be applied.
[0633] i. In one example, the threshold is equal to 1.
[0634] ii. In one example, the threshold is equal to 4.
[0635] b. In one example, when the ratio of the height to the width of the block is greater than a threshold, the vertical traversal and reverse vertical traversal scanning orders may only be applied.
[0636] i. In one example, the threshold is equal to 1.
[0637] ii. In one example, the threshold is equal to 4.
[0638] 26. It is proposed that only one intra prediction direction and / or one scanning direction is allowed in the QR-BDPCM process.
[0639] a. In one example, only vertical orientation is allowed on blocks where width is greater than height.
[0640] b. In one example, only horizontal direction is allowed on blocks where width is smaller than height.
[0641] c. In one example, an indication of the direction of the QR-BDPCM can be inferred for non-square blocks.
[0642] i. In one example, furthermore, the indication of the direction of the QR-BDPCM may be inferred to be a vertical direction for blocks that are wider than they are tall.
[0643] ii. In one example, furthermore, the indication of the direction of the QR-BDPCM may be inferred to be the horizontal direction for blocks whose width is smaller than the height.
[0644] 27. The methods in bullet points 24, 25 and 26 can be applied only to blocks with w*Th>=h or h*Th>=w, where w and h are the block width and height respectively, and Th is a threshold value.
[0645] a. In one example, Th is an integer (e.g., 4 or 8) and can be based on
[0646] i. Video content (e.g., screen content or natural content)
[0647] ii. Messages signaled in DPS / SPS / VPS / PPS / APS / picture header / slice header / slice group header / largest codec unit (LCU) / codec unit (CU) / LCU row / LCU group / TU / PU block / video codec unit
[0648] iii. Location of CU / PU / TU / block / video codec unit
[0649] iv. Block size of the current block and / or its neighboring blocks
[0650] v. Block shape of the current block and / or its neighboring blocks
[0651] vi. Indication of the color format (such as 4:2:0, 4:4:4, RGB, or YUV)
[0652] vii. Codec tree structure (such as dual tree or single tree)
[0653] viii. Slice / slice group type and / or picture type
[0654] ix. Color components (e.g., may apply only to luma or chroma components)
[0655] x. Time domain layer ID
[0656] xi. Standard grade / level / level
[0657] 5. Additional Embodiments
[0658] In the examples below, newly added text is in bold italics, and deleted text is marked with "[[ ]]".
[0659] 5.1 Example 1
[0660] This section illustrates an exemplary embodiment in which the bitstream representation of video may be changed compared to a baseline bitstream syntax.
[0661]
[0662]
[0663]
[0664]
[0665]
[0666]
[0667]
[0668]
[0669]
[0670]
[0671]
[0672]
[0673]
[0674]
[0675]
[0676]
[0677]
[0678]
[0679]
[0680]
[0681]
[0682]
[0683]
[0684]
[0685]
[0686] Table 9-4 Syntax elements and associated binarization
[0687]
[0688] Table 9-10 – ctxInc assignment for syntax elements with binary context coding
[0689]
[0690]
[0691] 5.2 Example #2
[0692] This embodiment will describe modeType.
[0693] The variable modeType specifies whether the codec unit in the codec tree node can use intra, IBC, and inter-frame codec mode (MODE_TYPE_ALL), is it possible to use only intra-frame, and IBC codec mode (MODE_TYPE_INTRA) or is it possible to use only inter codec mode (MODE_TYPE_INTER).
[0694] 5.3 Example #3
[0695] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag is signaled after pred_mode_ibc_flag.
[0696] 7.3.7.5 Codec unit syntax
[0697]
[0698]
[0699]
[0700] 5.4 Example #4
[0701] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag is signaled after pred_mode_ibc_flag and is only signaled when the current prediction mode is MODE_INTRA.
[0702] 7.3.7.5 Codec unit syntax
[0703]
[0704]
[0705] 5.5 Example #5
[0706] This embodiment describes the codec syntax.In this embodiment, pred_mode_ibc_flag is signaled after pred_mode_plt_flag.
[0707] 7.3.7.5 Codec unit syntax
[0708]
[0709]
[0710]
[0711] 5.6 Example #6
[0712] This embodiment describes the codec syntax.In this embodiment, pred_mode_ibc_flag is signaled after pred_mode_plt_flag, and pred_mode_plt_flag is signaled only when the current prediction mode is MODE_INTRA.
[0713] 7.3.7.5 Codec unit syntax
[0714]
[0715]
[0716]
[0717] 5.7 Example #7
[0718] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag and pred_mode_ibc_flag are signaled when the prediction mode is MODE_INTRA.
[0719] 7.3.7.5 Codec unit syntax
[0720]
[0721]
[0722] 5.8 Example #8
[0723] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag and pred_mode_ibc_flag are signaled when the prediction mode is not MODE_INTRA.
[0724] 7.3.7.5 Codec unit syntax
[0725]
[0726]
[0727] 5.9 Example #9
[0728] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag and pred_mode_ibc_flag are signaled when the prediction mode is MODE_INTER.
[0729] 7.3.7.5 Codec unit syntax
[0730]
[0731]
[0732]
[0733] 5.10 Example #10
[0734] This embodiment describes the semantics of pred_mode_plt_flag.
[0735]
[0736] 5.11 Example #11
[0737] This embodiment describes the semantics of pred_mode_plt_flag.
[0738]
[0739] 5.12 Example #12
[0740] This embodiment describes boundary strength derivation.
[0741] 8.8.3.5 Derivation of Boundary Filter Strength
[0742] The input to this process is:
[0743] Picture sample array recPicture,
[0744] Position (xCb, yCb), specifies the upper left sample point of the current codec block relative to the upper left sample point of the current picture,
[0745] The variable nCbW specifies the width of the current codec block.
[0746] The variable nCbH specifies the height of the current codec block.
[0747] The variable edgeType specifies whether to filter vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR).
[0748] The variable cIdx specifies the color component of the current codec block.
[0749] A two-dimensional (nCbW)x(nCbH) array of edgeFlags.
[0750] The output of this process is a two-dimensional (nCbW)x(nCbH) array bS that specifies the boundary filter strength.
[0751] …
[0752] The variable bS[xD i ][yD j ]:
[0753] If cIdx is equal to 0, and samples p0 and q0 are both in the codec block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set to equal to 0.
[0754] Otherwise, if the sample point p0 or q0 is in the codec block of the codec unit coded and decoded in intra-frame prediction mode, then bS[xD i ][yD j ] is set to equal to 2.
[0755] Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal to 2.
[0756] Otherwise, if the block edge is also a transform block edge and the sample p0 or q0 is in a transform block that includes one or more non-zero transform coefficient magnitudes, then bS[xD i ][yD j ] is set to be equal to 1.
[0757]
[0758] Otherwise, if the prediction mode of the codec sub-block including sample p0 is different from the prediction mode of the codec sub-block including sample q0, then bS[xD i ][yD j ] is set to be equal to 1.
[0759] Otherwise, if cIdx is equal to 0 and one or more of the following conditions are true, then bS[xD i ][yD j ] is set to 1:
[0760] The coded sub-block including sample p0 and the coded sub-block including sample q0 are both coded and decoded in IBC prediction mode, and the absolute difference between the horizontal or vertical components of the motion vectors used in the prediction of the two coded sub-blocks is greater than or equal to 4 in units of quarter luma samples.
[0761] For the prediction of the coded sub-block including the sample p0, a different reference picture or a different number of motion vectors than those used for the prediction of the coded sub-block including the sample q0 is used.
[0762] NOTE 1 – Whether the reference pictures used for two codec sub-blocks are the same or different is determined solely based on which pictures are referenced, regardless of whether the prediction is formed using an index into reference picture list 0 or an index into reference picture list 1, and regardless of whether the index positions within the reference picture lists are different.
[0763] NOTE 2 – The number of motion vectors used to predict the codec sub-block with the top left sample covering (xSb, ySb) is equal to PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb].
[0764] A motion vector is used to predict the codec sub-block including sample p0, and a motion vector is used to predict the codec sub-block including sample q0, and the absolute difference between the horizontal or vertical components of the motion vectors used is greater than or equal to 4 in units of quarter luma samples.
[0765] Two motion vectors and two different reference pictures are used to predict the codec sub-block including sample p0, two motion vectors for the same two reference pictures are used to predict the codec sub-block including sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two codec sub-blocks for the same reference picture is greater than or equal to 4 in units of quarter luma samples.
[0766] The codec sub-block including sample p0 is predicted using two motion vectors for the same reference picture, the codec sub-block including sample q0 is predicted using two motion vectors for the same reference picture, and both of the following conditions are true:
[0767] The absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in units of quarter samples, or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in units of quarter samples.
[0768] The absolute difference between the horizontal or vertical component of the List 0 motion vector used in the prediction of the codec sub-block including sample p0 and the List 1 motion vector used in the prediction of the codec sub-block including sample q0 is greater than or equal to 4 in units of quarter samples, or the absolute difference between the horizontal or vertical component of the List 1 motion vector used in the prediction of the codec sub-block including sample p0 and the List 0 motion vector used in the prediction of the codec sub-block including sample q0 is greater than or equal to 4 in units of quarter samples.
[0769] Otherwise, the variable bS[xD i ][yD j ] is set to equal to 0.
[0770] 5.13a Example #13a
[0771] This example describes the boundary strength derivation
[0772] 8.8.3.5 Derivation of Boundary Filter Strength
[0773] The input to this process is:
[0774] Picture sample array recPicture,
[0775] Position (xCb, yCb), specifies the upper left sample point of the current codec block relative to the upper left sample point of the current picture,
[0776] The variable nCbW specifies the width of the current codec block.
[0777] The variable nCbH specifies the height of the current codec block.
[0778] The variable edgeType specifies whether to filter vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR).
[0779] The variable cIdx specifies the color component of the current codec block.
[0780] A two-dimensional (nCbW)x(nCbH) array of edgeFlags.
[0781] The output of this process is a two-dimensional (nCbW)x(nCbH) array bS that specifies the boundary filter strength.
[0782] …
[0783] The variable bS[xD i ][yD j ]:
[0784] If cIdx is equal to 0, and samples p0 and q0 are both in the codec block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set to equal to 0.
[0785] Otherwise, if the sample point p0 or q0 is in the codec block of the codec unit coded and decoded in intra-frame prediction mode, then bS[xD i ][yD j ] is set to equal to 2.
[0786] Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal to 2.
[0787] Otherwise, if the block edge is also a transform block edge, and sample p0 or q0 is in a transform block that includes one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set to be equal to 1.
[0788]
[0789] Otherwise, if the prediction mode of the codec sub-block including sample p0 is different from the prediction mode of the codec sub-block including sample q0, then bS[xD i ][yD j ] is set to be equal to 1.
[0790] Otherwise, if cIdx is equal to 0 and one or more of the following conditions are true, then bS[xD i ][yD j ] is set to 1:
[0791] The coded sub-block including sample p0 and the coded sub-block including sample q0 are both coded and decoded in IBC prediction mode, and the absolute difference between the horizontal or vertical components of the motion vectors used in the prediction of the two coded sub-blocks is greater than or equal to 4 in units of quarter luma samples.
[0792] For the prediction of the coded sub-block including the sample p0, a different reference picture or a different number of motion vectors than those used for the prediction of the coded sub-block including the sample q0 is used.
[0793] NOTE 1 – Whether the reference pictures used for two codec sub-blocks are the same or different is determined solely based on which pictures are referenced, regardless of whether the prediction is formed using an index into reference picture list 0 or an index into reference picture list 1, and regardless of whether the index positions within the reference picture lists are different.
[0794] NOTE 2 – The number of motion vectors used to predict the codec sub-block with the top left sample covering (xSb, ySb) is equal to PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb].
[0795] A motion vector is used to predict the codec sub-block including sample p0, and a motion vector is used to predict the codec sub-block including sample q0, and the absolute difference between the horizontal or vertical components of the motion vectors used is greater than or equal to 4 in units of quarter luma samples.
[0796] Two motion vectors and two different reference pictures are used to predict the codec sub-block including sample p0, two motion vectors for the same two reference pictures are used to predict the codec sub-block including sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two codec sub-blocks for the same reference picture is greater than or equal to 4 in units of quarter luma samples.
[0797] The codec sub-block including sample p0 is predicted using two motion vectors for the same reference picture, the codec sub-block including sample q0 is predicted using two motion vectors for the same reference picture, and both of the following conditions are true:
[0798] The absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in units of quarter samples, or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two codec sub-blocks is greater than or equal to 4 in units of quarter samples.
[0799] The absolute difference between the horizontal or vertical component of the List 0 motion vector used in the prediction of the codec sub-block including sample p0 and the List 1 motion vector used in the prediction of the codec sub-block including sample q0 is greater than or equal to 4 in units of quarter samples, or the absolute difference between the horizontal or vertical component of the List 1 motion vector used in the prediction of the codec sub-block including sample p0 and the List 0 motion vector used in the prediction of the codec sub-block including sample q0 is greater than or equal to 4 in units of quarter samples.
[0800] Otherwise, the variable bS[xD i ][yD j ] is set to equal to 0.
[0801] 5.13b Example #13b
[0802] This embodiment describes the escaped sample encoding, decoding and reconstruction.
[0803]
[0804]
[0805]
[0806]
[0807] [[Specify the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.]]
[0808] Apply the following:
[0809] [[tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*
[0810] levelScale[qP%6])<<(qP / 6)+32)>> 6(8-77)
[0811] recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal)
[0812] (8-78)]]
[0813]
[0814]
[0815] 5.14 Example #14
[0816] 8.4.5.3 Decoding process for palette mode
[0817] The input to this process is:
[0818] – Position (xCb, yCb), specifies the upper left luminance sample of the current block relative to the upper left luminance sample of the current picture,
[0819] – variable startComp, specifies the first color component in the palette table,
[0820] – Variable cIdx, specifies the color component of the current block,
[0821] – Two variables nCbW and nCbH, specifying the width and height of the current block respectively.
[0822] The output of this process is an array recSamples[x][y] specifying the reconstructed sample values for the block, where x = 0..nCbW-1 and y = 0..nCbH-1.
[0823] Based on the value of cIdx, the variables nSubWidth and nSubHeight are derived as follows:
[0824] – If cIdx is equal to 0, then nSubWidth is set to 1 and nSubHeight is set to 1.
[0825] – Otherwise, nSubWidth is set to SubWidthC, and nSubHeight is set to SubHeightC.
[0826] The (nCbW x nCbH) block of the reconstructed sample array recSamples at position (xCb, yCb) is represented by recSamples[x][y] with x=0..nCTbW-1 and y=0..nCbH–1, and the value of recSamples[x][y] is derived as follows for each x in the range of 0 to nCbW–1 (inclusive) and each y in the range of 0 to nCbH–1 (inclusive):
[0827] – The variables xL and yL are derived as follows:
[0828] xL=palette_transpose_flag? x*nSubHeight:x*nSubWidth
[0829] (8-234)
[0830] yL=palette_transpose_flag? y*nSubWidth:y*nSubHeight
[0831] (8-235)
[0832] –Derived variable bIsEscapeSample as follows:
[0833] – If PaletteIndexMap[xCb+xL][yCb+yL] is equal to MaxPaletteIndex and palette_escape_val_present_flag is equal to 1, then set bIsEscapeSample equal to 1.
[0834] – Otherwise, set bIsEscapeSample equal to 0.
[0835] – If bIsEscapeSample is equal to 0, then the following applies:
[0836] recSamples[x][y]=CurrentPaletteEntries[cIdx][PaletteIndexMap[xCb+xL][yCb+yL]] (8-236)
[0837] – Otherwise, if cu_transquant_bypass_flag is equal to 1, then the following applies:
[0838] recSamples[x][y]=PaletteEscapeVal[cIdx][xCb+xL][yCb+yL](8-237)
[0839] – Otherwise (bIsEscapeSample is equal to 1 and cu_transquant_bypass_flag is equal to 0), then the following applies:
[0840] 1. Invoke the derivation process for the quantization parameter specified in clause 8.7.1, specifying the top left sample of the current block at position (xCb, yCb) relative to the top left sample of the current picture.
[0841]
[0842] QpPrimeTsMin=4+min_qp_prime_ts_minus4
[0843] 3. Derived the variable bitDepth as follows:
[0844] bitDepth=(cIdx==0)? BitDepth Y :BitDepth C(8-241)
[0845] 4. Specify the list levelScale[] as levelScale[k] = {40, 45, 51, 57, 64, 72}, where k = 0..5.
[0846] 5. Apply the following:
[0847] tmpVal=(PaletteEscapeVal[cIdx][xCb+xL][yCb+yL]*
[0848] levelScale[qP%6])<<(qP / 6)+32)>>6 (8-242)
[0849] recSamples[x][y]=Clip3(0,(1< <bitDepth)-1,tmpVal)
[0850] (8-243)
[0851] When one of the following conditions is true:
[0852] –cIdx is equal to 0 and numComps is equal to 1;
[0853] –cIdx is equal to 3;
[0854] Derive or modify the variable PredictorPaletteSize[startComp] and the array PredictorPaletteEntries as follows:
[0855]
[0856] A bitstream conformance requirement is that the value of PredictorPaletteSize[startComp] must be in the range of 0 to PaletteMaxPredictorSize (inclusive).
[0857] 5.15 Example #15
[0858] 8.4.2 Derivation Process for Luma Intra Prediction Mode
[0859] …
[0860] – Otherwise (skip_intra_flag[xPb][yPb] and DimFlag[xPb][yPb] are both equal to 0), derive IntraPredModeY[xPb][yPb] by the following ordered steps.
[0861] 1. The adjacent positions (xNbA, yNbA) and (xNbB, yNbB) are respectively set to be equal to (xPb - 1, yPb) and (xPb, yPb - 1).
[0862] 2. For the case where X is replaced by A or B, derive the variable candIntraPredModeX as follows:
[0863] ■ – Invoke the availability derivation process for the block in the z - scan order as specified in Clause 6.4.1 with the position (xCurr, yCurr) set to be equal to (xPb, yPb) and the adjacent position (xNbY, yNbY) set to be equal to (xNbX, yNbX) as the input, and assign the output to availableX.
[0864] ■ – Derive the candidate intra - prediction mode candIntraPredModeX as follows:
[0865] ■ – If availableX is equal to false, then set candIntraPredModeX to be equal to INTRA_DC.
[0866] ■ [[– Otherwise, if CuPredMode[xNbX][yNbX] is not equal to MODE_INTRA, or pcm_flag[xNbX][yNbX] is equal to 1, then set candIntraPredModeX to be equal to INTRA_DC,]]
[0867]
[0868] ■ - Otherwise, if X is equal to B, and yPb - 1 is less than ((yPb >> CtbLog2SizeY) << CtbLog2SizeY), then set candIntraPredModeB to be equal to INTRA_DC.
[0869] ■ – Otherwise, if IntraPredModeY[xNbX][yNbX] is greater than 34, then set candIntraPredModeX to be equal to INTRA_DC.
[0870] [[ID=Z7]]5.16 Example #16
[0871] 8.4.2 Derivation Process for Luminance Intra - prediction Mode
[0872] The inputs to this process are:
[0873] – The luminance position (xCb, yCb), which specifies the top - left sample of the current luminance coding block relative to the top - left luminance sample of the current picture.
[0874] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0875] - variable cbHeight, specifies the height of the current codec block in luminance samples,
[0876] In this process, the luma intra prediction mode IntraPredModeY[xCb][yCb] is derived.
[0877] 1. For the case where X is replaced by A or B, the variable candIntraPredModeX is derived as follows:
[0878] – Call the clause with as input the position (xCurr,yCurr) set equal to (xCb,yCb) and the adjacent position (xNbY,yNbY) set equal to (xNbX,yNbX) The availability derivation process for the block specified in is performed and the output is assigned to availableX.
[0879] – Derives the candidate intra prediction mode candIntraPredModeX as follows:
[0880] – If one or more of the following conditions are true, candIntraPredModeX is set equal to INTRA_PLANAR.
[0881] – The variable availableX is equal to false.
[0882] –CuPredMode[xNbX][yNbX] is not equal to MODE_INTRA.
[0883]
[0884] –intra_mip_flag[xNbX][yNbX] is equal to 1.
[0885] –X is equal to B, and yCb-1 is less than ((yCb>>CtbLog2SizeY)< <CtbLog2SizeY)。
[0886] – Otherwise, candIntraPredModeX is set equal to IntraPredModeY[xNbX][yNbX].
[0887] …
[0888] The variable IntraPredModeY[x][y] is set equal to IntraPredModeY[xCb][yCb], where x=xCb..xCb+cbWidth-1 and y=yCb..yCb+cbHeight-1.
[0889] 5.17 Example #17
[0890] 8.4.3 Derivation Process for Luma Intra Prediction Mode
[0891] The input to this process is:
[0892] – Luma position (xCb, yCb), specifies the upper left sample point of the current luma codec block relative to the upper left luma sample point of the current picture,
[0893] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0894] – The variable cbHeight specifies the height of the current codec block in luminance samples.
[0895] In this process, the luma intra prediction mode IntraPredModeY[xCb][yCb] is derived.
[0896] 2. For the case where X is replaced by A or B, the variable candIntraPredModeX is derived as follows:
[0897] – Call the availability derivation procedure for the block specified in clause 6.4.X [Ed.(Bb): Neighboring block availability check procedure to be determined] with as input the position (xCurr,yCurr) set equal to (xCb,yCb) and the neighboring position (xNbY,yNbY) set equal to (xNbX,yNbX), and assign the output to availableX.
[0898] – Derives the candidate intra prediction mode candIntraPredModeX as follows:
[0899] – If one or more of the following conditions are true, then set candIntraPredModeX equal to [[INTRA_PLANAR]]
[0900] – The variable availableX is equal to false.
[0901] –CuPredMode[xNbX][yNbX] is not equal to MODE_INTRA.
[0902] –intra_mip_flag[xNbX][yNbX] is equal to 1.
[0903] –X is equal to B, and yCb-1 is less than ((yCb>>CtbLog2SizeY)< <CtbLog2SizeY)。
[0904] – Otherwise, set candIntraPredModeX equal to IntraPredModeY[xNbX][yNbX].
[0905] …
[0906] The variable IntraPredModeY[x][y] is set equal to IntraPredModeY[xCb][yCb], where x=xCb..xCb+cbWidth-1 and y=yCb..yCb+cbHeight-1.
[0907] 5.18 Example #18
[0908] 8.4.3 Derivation Process for Luma Intra Prediction Mode
[0909] The input to this process is:
[0910] – Luma position (xCb, yCb), specifies the upper left sample point of the current luma codec block relative to the upper left luma sample point of the current picture,
[0911] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0912] – The variable cbHeight specifies the height of the current codec block in luminance samples.
[0913] In this process, the luma intra prediction mode IntraPredModeY[xCb][yCb] is derived.
[0914] 3. For the case where X is replaced by A or B, the variable candIntraPredModeX is derived as follows:
[0915] – Call the clause with as input the position (xCurr,yCurr) set equal to (xCb,yCb) and the adjacent position (xNbY,yNbY) set equal to (xNbX,yNbX) The availability deduction process for the block specified in is performed and the output is assigned to availableX.
[0916] – Derives the candidate intra prediction mode candIntraPredModeX as follows:
[0917] – If one or more of the following conditions are true, then candIntraPredModeX is set equal to [[INTRA_PLANAR]]
[0918] – The variable availableX is equal to false.
[0919] –CuPredMode[xNbX][yNbX] is not equal to MODE_INTRA.
[0920] –intra_mip_flag[xNbX][yNbX] is equal to 1.
[0921]
[0922] –X is equal to B, and yCb-1 is less than ((yCb>>CtbLog2SizeY)< <CtbLog2SizeY)。
[0923] – Otherwise, set candIntraPredModeX equal to IntraPredModeY[xNbX][yNbX].
[0924] …
[0925] The variable IntraPredModeY[x][y] is set equal to IntraPredModeY[xCb][yCb], where x=xCb..xCb+cbWidth-1 and y=yCb..yCb+cbHeight-1.
[0926] 5.19 Example #19
[0927]
[0928]
[0929]
[0930] 5.20 Example #20
[0931]
[0932]
[0933] 5.21 Example #21
[0934]
[0935]
[0936] 5.22 Example #22
[0937] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag is signaled after pred_mode_ibc_flag.
[0938] 7.3.7.5 Codec unit syntax
[0939]
[0940]
[0941] 5.23 Example #23
[0942]
[0943]
[0944]
[0945] 5.24 Example #24
[0946] This embodiment describes the codec syntax.In this embodiment, pred_mode_plt_flag is signaled after pred_mode_ibc_flag.
[0947] 7.3.7.5 Codec unit syntax
[0948]
[0949]
[0950]
[0951] 5.25 Example #25
[0952] This embodiment describes the codec syntax.In this embodiment, if the current prediction mode is MODE_PLT, then the palette syntax is signaled.
[0953] 7.3.7.5 Codec unit syntax
[0954]
[0955]
[0956]
[0957] 5.26 Example #26
[0958] This embodiment describes the derivation process of the chroma intra prediction mode.
[0959] Derivation process for chroma intra prediction modes
[0960] The input to this process is:
[0961] – Luma position (xCb, yCb), specifies the upper left sample of the current chroma codec block relative to the upper left luma sample of the current picture,
[0962] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0963] – The variable cbHeight specifies the height of the current codec block in luminance samples.
[0964] In this process, the chroma intra prediction mode IntraPredModeC[xCb][yCb] is derived.
[0965] The corresponding luma intra prediction mode lumaIntraPredMode is derived as follows:
[0966] – If intra_mip_flag[xCb][yCb] is equal to 1, then lumaIntraPredMode is set equal to INTRA_PLANAR.
[0967] – Otherwise, if CuPredMode[0][xCb][yCb] is equal to MODE_IBC Then lumaIntraPredMode is set equal to INTRA_DC.
[0968] – Otherwise, lumaIntraPredMode is set equal to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2].
[0969] …
[0970] 5.27 Example #27
[0971] This embodiment describes a picture reconstruction process using a mapping process for luma samples.
[0972] The image reconstruction process adopts the mapping process for brightness samples. The input of this process is:
[0973] – The position of the upper left sample point of the current block relative to the upper left sample point of the current picture (xCurr, yCurr),
[0974] – variable nCurrSw that specifies the block width,
[0975] – variable nCurrSh that specifies the block height,
[0976] –(nCurrSw)x(nCurrSh) array predSamples, specifies the brightness prediction samples of the current block,
[0977] –(nCurrSw)x(nCurrSh) array resSamples, specifies the luminance residual samples of the current block.
[0978] The output of this process is the reconstructed luminance image sample array recSamples.
[0979] The (nCurrSw)x(nCurrSh) array predMapSamples of mapped predicted luma samples is derived as follows:
[0980] – If one of the following conditions is true, then for i = 0..nCurrSw-1, j = 0..nCurrSh-1, predMapSamples[i][j] is set equal to predSamples[i][j].
[0981] –CuPredMode[0][xCurr][yCurr] is equal to MODE_INTRA.
[0982] –CuPredMode[0][xCurr][yCurr] is equal to MODE_IBC.
[0983]
[0984] – CuPredMode[0][xCurr][yCurr] is equal to MODE_INTER, and ciip_flag[xCurr][yCurr] is equal to 1.
[0985] – Otherwise (CuPredMode[0][xCurr][yCurr] is equal to MODE_INTER and ciip_flag[xCurr][yCurr] is equal to 0), the following applies:
[0986] …
[0987] 5.28 Example #28
[0988] This embodiment describes an exemplary scanning order corresponding to bullet point 24 in Section 4.
[0989] The input to this process is the block width blkWidth and the block height blkHeight.
[0990] The output of this process is the arrays hReverScan[sPos][sComp] and vReverScan[sPos][sComp]. The array hReverScan represents the horizontal reverse scan order, and the array vReverScan represents the vertical reverse scan order. The array index sPos specifies the scan position in the range from 0 to (blkWidth*blkHeight)-1 (inclusive). An array index sComp equal to 0 specifies the horizontal component, and an array index sComp equal to 1 specifies the vertical component. Based on the values of blkWidth and blkHeight, the arrays hTravScan and vTravScan are derived as follows:
[0991]
[0992]
[0993]
[0994] Figure 6 6 is a block diagram of a video processing device 600. Device 600 can be used to implement one or more of the methods described herein. Device 600 can be implemented in a smartphone, tablet computer, computer, Internet of Things (IoT) receiver, etc. Device 600 may include one or more processors 602, one or more memories 604, and video processing hardware 606. One or more processors 602 can be configured to implement one or more methods described in this document. One or more memories 604 can be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 606 can be used to implement some of the techniques described in this document in hardware circuits. In some embodiments, hardware 606 can be at least partially located within processor 602 (e.g., a graphics coprocessor).
[0995] Figure 8 800 is a flow chart of a method 800 for processing video. The method 800 includes determining (805) a palette mode to be used for processing a transform unit, a codec block, or a region, encoding the use of the palette mode separately from the prediction mode; and performing further processing on the transform unit, the codec block, or the region using the palette mode.
[0996] With reference to method 800, some examples of palette mode encoding and decoding and its use are described in Section 4 of this document.
[0997] Referring to method 800 , a video block may be encoded into a video bitstream, wherein high bit efficiency may be achieved in the video bitstream by utilizing bitstream generation rules associated with palette mode codecs.
[0998] The method may comprise wherein the prediction mode is encoded prior to the indication of use of the palette mode.
[0999] The method may comprise wherein use of the palette mode is conditionally signaled based on the prediction mode.
[1000] The method may include wherein the prediction mode is an intra block copy mode and signaling of an indication of use of a palette mode is skipped.
[1001] The method may include, wherein, based on the current prediction mode being the intra block copy mode, determining the use indication of the palette mode to be false.
[1002] The method may include wherein the prediction mode is inter mode and signaling of an indication of use of palette mode is skipped.
[1003] The method may include: wherein, based on the current prediction mode being the inter mode, the indication of use of the palette mode is determined to be false.
[1004] The method may include wherein the prediction mode is intra mode and signaling of an indication of use of palette mode is skipped.
[1005] The method may include, wherein, based on the current prediction mode being intra mode, determining the indication of use of palette mode to be false.
[1006] The method may include wherein the prediction mode is intra mode and signaling of an indication of use of palette mode is skipped.
[1007] The method may include, wherein the prediction mode is an intra block copy mode, and signaling of an indication of use of a palette mode is performed.
[1008] The method may include, wherein the indication of use of the palette mode is signaled based on picture, slice or slice group type.
[1009] The method may include, wherein, adding the palette mode as a candidate for the prediction mode.
[1010] The method may include: wherein the prediction mode includes one or more of intra mode, intra block copy mode or palette mode for intra slice, inter slice, I picture, P picture, B picture or intra slice group.
[1011] The method may include: wherein the prediction mode includes two or more of an intra mode, an inter mode, an intra block copy mode, or a palette mode.
[1012] The method may include: wherein the use of the palette mode is indicated by signaling or derived based on a condition.
[1013] The method may include: wherein the condition includes one or more of the following: block dimension of the current block, prediction mode of the current block, quantization parameter (QP) of the current block, palette flag of the neighboring block, intra-block copy flag of the neighboring block, indication of color format, single or dual codec tree structure or slice type or group type or picture type.
[1014] The method may include wherein the use of the palette mode is signaled or derived based on a slice level flag, a slice group level flag, or a picture level flag.
[1015] The method may include: wherein the use indication of the intra block copy mode is signaled or derived based on a slice level flag, a slice group level flag or a picture level flag.
[1016] With reference to items 6 to 9 disclosed in the previous section, some embodiments may preferably use the following solution.
[1017] A solution may include a video processing method, the method comprising: performing a conversion between a current video block of a picture of a video and a bitstream representation of the video, wherein information regarding whether intra block copying is used in the conversion is signaled in the bitstream representation or derived based on a codec condition of the current video block; wherein the intra block copy mode includes encoding and decoding the current video block from another video block in the picture. The following features may be implemented in various embodiments
[1018] -Wherein, the encoding and decoding conditions include the block dimensions of the current video block.
[1019] -The encoding and decoding conditions include a prediction mode of the current video block or a quantization parameter used in a transformation for the current video block.
[1020] With reference to items 13-15 disclosed in the previous sections, some embodiments may preferably implement the following solutions.
[1021] A solution may include a method for determining whether to apply a deblocking filter during conversion of a current video block of a video picture, wherein the current video block is encoded using a palette mode codec in which the current video block is represented using fewer representative sample values than the total number of pixels of the current video block; and performing the conversion such that the deblocking filter is applied if it is determined that the deblocking filter is to be applied.
[1022] Another solution may include a video processing method comprising determining a quantization or inverse quantization process to use during conversion between a current video block of a picture of a video and a bitstream representation of the video, wherein the current video block is encoded or decoded using a palette mode codec in which the current video block is represented using fewer representative sample values than the total number of pixels of the current video block; and performing the conversion based on the determination of the quantization or inverse quantization process. Additional features may include:
[1023] - wherein the quantization or inverse quantization process determined for the current video block is different from another quantization or another inverse quantization process applied to another video block coded in a different than palette codec mode.
[1024] - wherein the converting comprises encoding the current video block into a bitstream representation.
[1025] - wherein the converting comprises decoding a bitstream representation to generate a current video block of the video.
[1026] - wherein the step of determining uses the same decision process as another decision process used for conversion of another video block for intra-frame coding.
[1027] It should be understood that the disclosed technology can be embodied in a video encoder or decoder to improve compression efficiency using an enhanced codec tree structure.
[1028] With reference to items 16 to 21 disclosed in the previous section, some solutions can be as follows:
[1029] A video processing method comprises: for conversion between a current video block of a video comprising a plurality of video blocks and a bitstream representation of the video, determining that the current video block is a palette-coded block; based on the step of determining, performing a most probable mode list building process by considering the current video block as an intra-coded block; and performing the conversion based on a result of the list building process; wherein the palette-coded block is encoded or decoded using a palette or representative sample values.
[1030] The above method, wherein the list building process treats adjacent palette codec blocks as intra blocks with a default mode.
[1031] A method of video processing, comprising: for conversion between a current video block of a video comprising a plurality of video blocks and a bitstream representation of the video, determining that the current video block is a palette codec block; performing a most probable mode list building process based on the determining step by considering the current video block as a non-intra-coded block; and performing the conversion based on a result of the list building process; wherein the palette codec block is encoded or decoded using a palette or representative sample values.
[1032] The above method, wherein, when retrieving the intra mode of the adjacent palette codec block, the list building process treats the adjacent palette codec block as an inter codec block.
[1033] A video processing method comprises: for conversion between a current video block of a video comprising a plurality of video blocks and a bitstream representation of the video, determining that the current video block is a palette-coded block; performing a list construction process based on the determination by considering the current video block as an unavailable block; and performing the conversion based on a result of the list construction process; wherein the palette-coded block is encoded or decoded using a palette or representative sample values.
[1034] The above method, wherein the list building process is used for history-based motion vector prediction.
[1035] The above method, wherein the list construction process is used for MERGE or advanced motion vector prediction mode.
[1036] In the above method, the determining step further includes determining based on the content of the video.
[1037] The above method, wherein the step of determining corresponds to a field in the bitstream representation.
[1038] A video processing method includes: determining that the current video block is a palette-coded block during conversion between a current video block and a bitstream representation of the current video block; determining a range of context-coded binary numbers for the conversion based on the current video block being the palette-coded block; and performing the conversion based on the range of context-coded binary numbers.
[1039] The above method, wherein during the conversion, a bypass encoding and decoding technology is used to encode and decode the binary numbers of the current video block that fall outside the range, or a bypass decoding technology is used to decode the binary numbers of the current video block that fall outside the range.
[1040] The above method, wherein the converting comprises encoding the video into a bitstream representation.
[1041] The above method, wherein the converting comprises decoding the bitstream representation to generate the video.
[1042] Figure 24is a block diagram illustrating an exemplary video processing system 2400 in which the various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 2400. System 2400 may include an input 2402 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8-bit or 10-bit multi-component pixel values, or may be received in a compressed or encoded format. Input 1902 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a passive optical network (PON), and wireless interfaces such as Wi-Fi or a cellular interface.
[1043] System 2400 may include a codec component 2404 that may implement various codecs or coding methods described in this document. Codec component 2404 may reduce the average bit rate of the video from input 2402 to the output of codec component 2404 to generate a codec representation of the video. Therefore, codec technology is sometimes referred to as video compression or video transcoding technology. The output of codec component 2404 may be stored or transmitted via a connected communication, as shown in component 2406. The bitstream (or encoded and decoded) representation of the video received at input 2402 or transmitted may be used by component 2408 to generate pixel values or to be sent to a displayable video on display interface 2410. The process of generating a user-viewable video from the bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it should be understood that codec tools or operations are used at the encoder, and the corresponding decoding tools or operations that reverse the codec results will be performed by the decoder.
[1044] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), DisplayPort, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described in this document may be implemented in various electronic devices, such as mobile phones, laptop computers, smart phones, or other devices capable of performing digital data processing and / or video display.
[1045] Figure 25 2 is a flowchart representation of a method 2500 for video processing according to the present technology. The method 2500 includes performing, at operation 2510, conversion between a block of a video region of a video and a bitstream representation of the video. The bitstream representation is processed according to a first format rule and a second format rule, wherein the first format rule specifies a first indication of whether to signal use of a palette mode for the block, and the second format rule specifies a position of the first indication relative to a second indication of use of a prediction mode for the block.
[1046] In some embodiments, the video region comprises a transform unit, a coding unit, a prediction unit or a region of the video.In some embodiments, in the bitstream representation, the second indication of use of the prediction mode precedes the first indication of use of the palette mode.
[1047] In some embodiments, the first indication of use of a palette mode is conditionally included in the bitstream representation based on the second indication of use of a prediction mode. In some embodiments, if the second indication of use of a prediction mode indicates an intra block copy (IBC) prediction mode, then the first indication of use of a palette mode is skipped in the bitstream representation. In some embodiments, if the second indication of use of a prediction mode indicates an inter prediction mode, then the first indication of use of a palette mode is skipped in the bitstream representation. In some embodiments, if the second indication of use of a prediction mode indicates an intra prediction mode, then the first indication of use of a palette mode is skipped in the bitstream representation. In some embodiments, if the second indication of use of a prediction mode indicates a skip mode, then the first indication of use of a palette mode is skipped in the bitstream representation. In some embodiments, skipping the first indication of use of a palette mode in the bitstream representation indicates that a palette mode is not used.
[1048] In some embodiments, if the second indication of use of the prediction mode indicates IBC prediction mode, then the first indication of use of the palette mode is encoded into the bitstream. In some embodiments, if the second indication of use of the prediction mode indicates intra-frame prediction mode, then the first indication of use of the palette mode is encoded into the bitstream. In some embodiments, the prediction mode is not pulse code modulation (PCM) mode. In some embodiments, the first indication of use of the palette mode is encoded and decoded before the indication of use of the PCM mode in the bitstream representation. In some embodiments, the indication of use of the PCM mode is skipped in the bitstream representation. In some embodiments, the indication of IBC mode is encoded and decoded into the bitstream representation. In some embodiments, if intra-frame prediction mode is used, then a flag in the bitstream representation indicates whether the palette mode or IBC mode is signaled in the bitstream representation. In some embodiments, the flag is skipped based on a condition of the block, the condition including the dimensions of the block, whether IBC mode is enabled for the region associated with the block, or whether palette mode is enabled for the region associated with the block.
[1049] In some embodiments, if the second indication of use of a prediction mode indicates an inter-prediction mode, then the first indication of use of a palette mode is encoded into the bitstream. In some embodiments, the first indication of use of a palette mode is encoded after at least one of: an indication of skip mode, a prediction mode, or an indication of use of PCM mode. In some embodiments, the first indication of use of a palette mode is encoded after an indication of skip mode or a prediction mode and before an indication of use of PCM mode.
[1050] In some embodiments, in a bitstream representation, a first indication of use of a palette mode precedes a second indication of use of a prediction mode. In some embodiments, the first indication of use of a palette mode follows the second indication of use of a prediction mode, the second indication of use of a prediction mode indicating an intra-frame or inter-frame prediction mode in the bitstream representation. In some embodiments, the first indication of use of a palette mode is signaled based on a picture, slice, or slice group type. In some embodiments, the first indication of use of a palette mode includes a first flag indicating that palette mode is enabled for the block. In some embodiments, the first indication of use of a palette mode is conditionally included in the bitstream representation based on the first flag indicating that palette mode is enabled at a sequence level, a picture level, a slice group level, or a slice level. In some embodiments, if palette mode is disabled for a block, another flag indicating a PCM mode for the block is included in the bitstream representation. In some embodiments, the first flag is contextually encoded and decoded based on information of one or more neighboring blocks of the current block. In some embodiments, the first flag is encoded and decoded without requiring contextual information from one or more neighboring blocks of the current block.
[1051] In some embodiments, the second indication of use of the prediction mode includes a second flag indicating the prediction mode. In some embodiments, if the second flag in the bitstream representation indicates that the prediction mode is inter mode, then the bitstream representation further includes a third flag indicating whether intra block copy mode is enabled. In some embodiments, if the second flag in the bitstream representation indicates that the prediction mode is intra mode, then the bitstream representation further includes a third flag indicating whether intra block copy mode is enabled. In some examples, the third flag is conditionally included in the bitstream representation based on the dimensions of the block.
[1052] In some embodiments, the block is a codec unit and a second flag in the bitstream representation indicates that the prediction mode is intra mode. In some examples, the first flag is conditionally included in the bitstream representation based on a dimension of the block.
[1053] Figure 262 is a flowchart representation of a method 2600 for video processing according to the present technology. The method 2600 includes, at operation 2610, determining a prediction mode for converting between a block of a video region of a video and a bitstream representation of the video based on one or more allowed prediction modes for the block, including at least a palette mode. An indication of use of the palette mode is determined based on the prediction mode. The method 2600 includes, at operation 2620, performing the conversion based on the determined step.
[1054] In some embodiments, the one or more allowed prediction modes include intra mode. In some embodiments, the one or more allowed prediction modes include intra block copy (IBC) mode. In some embodiments, the one or more allowed prediction modes include inter mode.
[1055] In some embodiments, the video region comprises an intra slice, an intra picture, or an intra slice group.In some embodiments, the one or more allowed prediction modes comprise intra mode, intra block copy mode, and palette mode.
[1056] In some embodiments, the video region comprises an inter slice, an inter picture, an inter slice group, a P slice, a B slice, a P picture, or a B picture. In some embodiments, the one or more allowed prediction modes comprise intra mode, intra block copy mode, palette mode, and inter mode.
[1057] In some embodiments, the block has dimensions of 4x4. In some embodiments, if the block has dimensions of 4x4, then the one or more allowed prediction modes exclude inter mode.
[1058] In some embodiments, if the block is not coded in skip mode, the bitstream representation comprises at least a prediction mode index representing the one or more allowed prediction modes, wherein the prediction mode index is represented using one or more binary numbers.
[1059] In some embodiments, three binary numbers are used to represent the prediction mode index, wherein the first binary value "1" indicates the intra mode, wherein the first binary value "0" and the second binary value "0" indicate the inter mode, wherein the first binary value "0", the second binary value "1" and the third binary value "0" indicate the IBC mode, and wherein the first binary value "0", the second binary value "1" and the third binary value "1" indicate the palette mode.
[1060] In some embodiments, two binary numbers are used to represent the prediction mode index, wherein the first binary value "1" and the second binary value "0" indicate the intra mode, wherein the first binary value "0" and the second binary value "0" indicate the inter mode, wherein the first binary value "0" and the second binary value "1" indicate the IBC mode, and wherein the first binary value "1" and the second binary value "1" indicate the palette mode.
[1061] In some embodiments, if the current slice of the video is an intra slice and IBC mode is disabled, a binary number is used to represent the prediction mode index, the first binary value "0" indicates the intra mode, and the second binary value "1" indicates the palette mode.
[1062] In some embodiments, if a current slice of the video is not an intra slice and IBC mode is disabled, then the prediction mode index is represented using two binary numbers, wherein a first binary value of "1" indicates intra mode, wherein a first binary value of "0" and a second binary value of "0" indicate inter mode, and wherein the first binary value of "0" and the second binary value of "1" indicate palette mode. In some embodiments, if a current slice of the video is an intra slice and IBC mode is enabled, then the prediction mode index is represented using two binary numbers, wherein a first binary value of "1" indicates IBC mode, wherein the first binary value of "0" and the second binary value of "1" indicate palette mode, and wherein the first binary value of "0" and the second binary value of "0" indicate intra mode. In some embodiments, the indication of use of the IBC mode is signaled in a sequence parameter set (SPS) of the bitstream representation.
[1063] In some embodiments, three binary numbers are used to represent the prediction mode index.
[1064] wherein the first binary value “1” indicates the inter-frame mode, wherein the first binary value “0” and the second binary value “1” indicate the intra-frame mode, wherein the first binary value “0”, the second binary value “0” and the third binary value “1” indicate the IBC mode, and wherein the first binary value “0”, the second binary value “0” and the third binary value “0” indicate the palette mode.
[1065] In some embodiments, three binary numbers are used to represent the prediction mode index.
[1066] wherein the first binary value “1” indicates intra mode, wherein the first binary value “0” and the second binary value “1” indicate inter mode, wherein the first binary value “0”, the second binary value “0” and the third binary value “1” indicate IBC mode, and wherein the first binary value “0”, the second binary value “0” and the third binary value “0” indicate palette mode.
[1067] In some embodiments, three binary numbers are used to represent the prediction mode index, wherein the first binary value "0" indicates the inter-frame mode, wherein the first binary value "1" and the second binary value "0" indicate the intra-frame mode, wherein the first binary value "1", the second binary value "1" and the third binary value "1" indicate the IBC mode, and wherein the first binary value "1", the second binary value "1" and the third binary value "0" indicate the palette mode.
[1068] In some embodiments, signaling of one of the one or more bins is skipped in the bitstream representation if a condition is met. In some embodiments, the condition comprises a dimension of the block. In some embodiments, the condition comprises disabling a prediction mode, and wherein the bin corresponding to the prediction mode is skipped in the bitstream representation.
[1069] Figure 27 2 is a flowchart representation of a method 2700 for video processing according to the present technology. The method 2700 includes performing conversion between blocks of a video and a bitstream representation of the video at operation 2710. The bitstream representation is processed according to format rules, wherein the format rules specify that a first indication of use of a palette mode and a second indication of use of an intra block copy (IBC) mode are signaled dependently on each other.
[1070] In some embodiments, the format rule specifies that if the prediction mode of the block is equal to a first prediction mode that is not IBC mode, then the first indication is signaled in the bitstream representation. In some embodiments, the format rule specifies that if the prediction mode of the block is equal to a first prediction mode that is not palette mode, then the second indication is signaled in the bitstream representation. In some embodiments, the first prediction mode is intra mode.
[1071] Figure 28 2 is a flowchart representation of a method 2800 for video processing according to the present technology. The method 2800 includes, at operation 2810, determining, for conversion between a block of video and a bitstream representation of the video, the presence of a palette mode usage indication in the bitstream representation based on the dimensions of the block. The method 2800 includes, at operation 2820, performing the conversion based on the determination.
[1072] Figure 29 A flowchart representation of a method 2900 for video processing according to the present technology is shown. Method 2900 includes, at operation 2910, determining, for conversion between a block of video and a bitstream representation of the video, the presence of an indication of use of an intra block copy (IBC) mode in the bitstream representation based on the dimensions of the block. Method 2900 includes, at operation 2920, performing the conversion based on the determination. In some embodiments, the dimensions of the block include at least one of the following: the number of samples in the block, the width of the block, or the height of the block.
[1073] In some embodiments, if the width of the block is equal to or less than a threshold, then this indication is signaled in the bitstream representation. In some embodiments, if the height of the block is equal to or less than a threshold, then this indication is signaled in the bitstream representation. In some embodiments, the threshold is 64.
[1074] In some embodiments, if the width and height of the block are greater than a threshold, then this indication is signaled in the bitstream representation. In some embodiments, the threshold is 4. In some embodiments, if the number of samples in the block is greater than a threshold, then this indication is signaled in the bitstream representation. In some embodiments, the threshold is 16. In some embodiments, if the width of the block is equal to the height of the block, then this indication is signaled in the bitstream representation.
[1075] In some embodiments, the indication is not present in the bitstream representation if (1) the width of the block is greater than a first threshold, (2) the height of the block is greater than a second threshold, or (3) the number of samples in the block is equal to or less than a third threshold. In some embodiments, the first threshold and the second threshold are 64. In some embodiments, the third threshold is 16.
[1076] In some embodiments, the determining step is further based on a characteristic associated with the block. In some embodiments, the characteristic comprises a prediction mode for the block. In some embodiments, the characteristic comprises a quantization parameter for the block. In some embodiments, the characteristic comprises a palette flag for a neighboring block of the block. In some embodiments, the characteristic comprises an IBC flag for a neighboring block of the block. In some embodiments, the characteristic comprises an indication of a color format for the block. In some embodiments, the characteristic comprises a codec tree structure for the block. In some embodiments, the characteristic comprises a slice group type, a slice group type, or a picture type for the block.
[1077] Figure 3030 is a flowchart representation of a method 3000 for video processing according to the present technology. The method 3000 includes, at operation 3010, determining whether a palette mode is allowed for a block of video based on a second indication of a video region containing the block for conversion between the block of video and a bitstream representation of the video. The method 3000 also includes, at operation 3020, performing the conversion based on the determination.
[1078] In some embodiments, the video region comprises a slice, a slice group, or a picture. In some embodiments, if the second indication indicates that fractional motion vector differences are enabled, then the bitstream representation excludes an explicit indication of whether palette mode is allowed. In some embodiments, the second indication is represented as a flag present in the bitstream representation. In some embodiments, the second indication indicates whether palette mode is enabled for the video region. In some embodiments, if the second indication indicates that palette mode is disabled for the video region, then the bitstream representation excludes an explicit indication of whether palette mode is allowed. In some embodiments, if the bitstream representation excludes an explicit indication of whether palette mode is allowed, then palette mode is not allowed for the block.
[1079] Figure 31 31 is a flowchart representation of a method 3100 for video processing according to the present technology. The method 3100 includes, at operation 3110, determining whether an intra block copy (IBC) mode is allowed for a block of video based on a second indication of a video region containing the block for conversion between the block of video and a bitstream representation of the video. The method 3100 also includes, at operation 3120, performing the conversion based on the determination.
[1080] In some embodiments, the video region includes a slice, a slice group, or a picture. In some embodiments, if the second indication indicates that fractional motion vector differences are enabled, then the bitstream representation excludes an explicit indication of whether IBC mode is allowed. In some embodiments, the second indication is represented as a flag present in the bitstream representation. In some embodiments, the second indication indicates whether IBC mode is enabled for the video region. In some embodiments, if the second indication indicates that IBC mode is disabled for the video region, then the bitstream representation excludes an explicit indication of whether IBC mode is allowed. In some embodiments, if the bitstream representation excludes an explicit indication of whether IBC mode is allowed, then IBC mode is not allowed for the block.
[1081] Figure 3232 is a flowchart representation of a method 3200 for video processing according to the present technology. The method 3200 includes, at operation 3210, determining a first bit depth of a first sample associated with a palette entry in a palette mode for conversion between a block of video and a bitstream representation of the video. The first bit depth is different from a second bit depth associated with the block. The method 3200 also includes, at operation 3220, performing the conversion based on the determining step.
[1082] In some embodiments, the second bit depth comprises an internal bit depth for the block. In some embodiments, the second bit depth comprises a bit depth associated with the original samples of the block. In some embodiments, the second bit depth comprises a bit depth associated with the reconstructed samples of the block. In some embodiments, the first bit depth is a positive integer. In some embodiments, the first bit depth is equal to 8. In some embodiments, the first bit depth is greater than the second bit depth. In some embodiments, the first bit depth is less than the second bit depth. In some embodiments, the first bit depth is determined based on the dimensions of the block. In some embodiments, the first bit depth is determined based on a quantization parameter of the block. In some embodiments, the first bit depth is determined based on an indication of a color format of the block. In some embodiments, the first bit depth is determined based on a codec tree structure of the block. In some embodiments, the first bit depth is determined based on a slice group type, a slice group type, or a picture type of the block.
[1083] In some embodiments, the first bit depth is determined based on a number of palette entries associated with the block. In some embodiments, the first bit depth is determined based on a number of entries in a palette predictor associated with the block. In some embodiments, the first bit depth is determined based on one or more indices of color components of the block.
[1084] In some embodiments, the second sample is associated with another palette entry in the palette mode, the second sample having a third bit depth different from the first bit depth. In some embodiments, the third bit depth is greater than the second bit depth. In some embodiments, the third bit depth is less than the second bit depth.
[1085] In some embodiments, the third sample of the block is reconstructed based on shifting the value of the first sample by M bits, where M is a positive integer. In some embodiments, shifting the value of the first sample includes shifting the first sample left by M bits. In some embodiments, the first sample has a value C, and the reconstructed second sample has a value of (C << M)+(1 << (M - 1)). In some embodiments, shifting the value of the first sample includes shifting the first sample right by M bits. In some embodiments, the first sample has a value C, and the reconstructed second sample has a value determined based on (C+(1 << (M - 1))) >> M, which is bounded by a minimum value of 0 and a maximum value of (1 << N)-1. In some embodiments, M is determined based on the difference between a first bit depth and a second bit depth. In some embodiments, M is equal to the second bit depth minus the first bit depth. In some embodiments, M is equal to the first bit depth minus the second bit depth. In some embodiments, M is equal to 2. In some examples, M is determined based on the dimensions of the block. In some embodiments, M is determined based on the quantization parameter of the block. In some embodiments, M is determined based on an indication of the color format of the block. In some examples, M is determined based on the codec tree structure of the block. In some embodiments, M is determined based on the slice group type, picture group type, or picture type of the block. In some embodiments, M is determined based on the number of palette entries associated with the block. In some embodiments, M is determined based on the number of predicted palette entries associated with the block. In some embodiments, M is determined based on the positions of the first sample and the third sample in the block. In some embodiments, M is determined based on the index of the color format of the block.
[1086] In some embodiments, the method includes determining a first sample associated with a palette entry based on a lookup operation performed on a table of samples. In some embodiments, the value of the sample table is signaled in a sequence parameter set (SPS), video parameter set (VPS), picture parameter set (PPS), picture header, slice header, picture group header, one row of maximum coding units (LCUs), or a group of LCUs in the bitstream representation. In some embodiments, the value of the sample table is derived based on information in a sequence parameter set (SPS), video parameter set (VPS), picture parameter set (PPS), picture header, slice header, picture group header, one row of maximum coding units (LCUs), or a group of LCUs in the bitstream representation.
[1087] Figure 33A flowchart representation of a method 3300 for video processing according to the present technology is shown. The method 3300 includes: at operation 3310, for converting between a current block of a video and a bitstream representation of the video, if a neighboring block of the current block encoded in the palette mode is located above or to the left of the current block, determining that the neighboring block of the current block encoded in the palette mode is to be processed as an intra-coded block with a default mode during construction of a most probable mode (MPM) candidate list for the current block. The method 3300 includes: at operation 3320, performing the conversion based on the step of determining.
[1088] In some embodiments, the default mode comprises a planar mode. In some embodiments, the default mode comprises a DC mode, a vertical mode, or a horizontal mode. In some embodiments, the default mode is signaled in a dependency parameter set, a sequence parameter set, a video parameter set, a picture parameter set (PPS), a picture header, a slice header, a slice group header, a largest codec unit (LCU), a codec unit (CU), an LCU row, an LCU group, a transform unit (TU), a prediction unit (PU) block, or a video codec unit in a bitstream representation.
[1089] Figure 34 A flowchart representation of a method 3400 for video processing according to the present technology is shown. The method 3400 includes, at operation 3410, determining parameters for deblocking filtering according to a rule for a video block that is encoded into a bitstream representation as a palette-mode codec. The method 3400 also includes, at operation 3420, performing conversion between the block and a bitstream representation of the video using the parameters for deblocking filtering.
[1090] In some embodiments, the rule specifies that for the step of determining parameters for deblocking filtering, the block is to be treated as an intra-coded block of the video.
[1091] In some embodiments, if the first side of the boundary of the block or the second side of the boundary of the block is coded in palette mode, the boundary strength for deblocking filtering is 2. In some embodiments, if the first side of the boundary of the block and the second side of the boundary of the block are coded in palette mode, the boundary strength for deblocking filtering is determined to be 2. In some embodiments, the rule specifies that for the step of determining parameters for deblocking filtering, the block is to be treated as an inter-coded block of the video.
[1092] In some embodiments, the rule specifies that for the step of determining parameters for deblocking filtering, the palette mode is treated separately from other modes in deblocking filtering. In some embodiments, if the first side of the boundary of the block or the second side of the boundary of the block is coded in palette mode, then the boundary strength for deblocking filtering is determined to be 0. In some embodiments, if the first side of the boundary of the block is coded in palette mode and the second side of the boundary of the block is coded in intra block copy (IBC) mode, then the boundary strength for deblocking filtering is 1. In some embodiments, if the first side of the boundary of the block is coded in palette mode and the second side of the boundary of the block is coded in intra mode, then the boundary strength for deblocking filtering is 2.
[1093] In some embodiments, the rule specifies that for the step of determining parameters for deblocking filtering, the palette mode is treated as a transform skip mode in deblocking filtering. In some embodiments, the rule specifies that for the step of determining parameters for deblocking filtering, the palette mode is treated as a block-based differential pulse codec modulation (BDPCM) mode in deblocking filtering.
[1094] Figure 35 35 is a flowchart representation of a method 3500 for video processing according to the present technology. The method 3500 includes, at operation 3410, determining, for conversion between a current block of a video and a bitstream representation of the video, that a neighboring block of the current block that is coded in a palette mode is to be treated as a non-intra coded block during construction of a most probable mode (MPM) candidate list for the current block. The method 3500 also includes, at operation 3520, performing the conversion based on the determination.
[1095] In some embodiments, if the neighboring block is located above or to the left of the current block, the neighboring block is processed as an inter-frame coded block. In some embodiments, if the neighboring block is located above or to the left of the current block, the neighboring block is processed as an intra-frame block copy (IBC) coded block.
[1096] Figure 36A 36 is a flowchart representation of a method 3600 for video processing according to the present technology. The method 3600 includes, at operation 3610, determining, for a block of a video, a quantization parameter associated with the block. The method 3600 includes, at operation 3620, encoding and decoding the block of video as a palette codec block into a bitstream representation of the video based in part on a modified value of the quantization parameter. The method also includes, at operation 3630, signaling codec information related to the quantization parameter in the bitstream representation.
[1097] Figure 36B36 is a flowchart representation of a method 3650 for video processing according to the present technology. The method 3650 includes, at operation 3660, deriving a quantization parameter based on a bitstream representation of the video. The method 3650 also includes, at operation 3670, decoding a palette codec block based in part on a modified quantization parameter determined by modifying the quantization parameter.
[1098] In some embodiments, the quantization parameter is modified based on setting a maximum limit for the quantization parameter. In some embodiments, the quantization parameter is modified based on setting a minimum limit for the quantization parameter. In some embodiments, the quantization parameter is modified in the same manner as a second quantization parameter associated with a block encoded in transform skip mode. In some embodiments, the quantization parameter is modified in the same manner as a third quantization parameter associated with a block encoded in block-based delta pulse code modulation (BDPCM) mode.
[1099] In some embodiments, the quantization parameter is denoted as Qp, and wherein modifying the quantization parameter comprises revising the value of Qp to max(Qp, 4 + T), where T is a non-negative integer value. In some embodiments, T is based on a predefined threshold. In some embodiments, T is 4 + Ts, and Ts is signaled in the bitstream representation. In some embodiments, Ts is signaled in the syntax element min_qp_prime_ts_minus4 in the bitstream representation.
[1100] Figure 37 37 is a flowchart representation of a method 3700 for video processing according to the present technology. The method 3700 includes, at operation 3710, determining, for a video block encoded as a palette-encoded block into a bitstream representation of video, a representation of escape samples of the block in the bitstream representation, regardless of whether a bypass mode is enabled for the block. The method 3700 also includes, at operation 3720, performing a conversion between the block and the bitstream representation based on the determining step.
[1101] In some embodiments, a fixed length is used in the bitstream representation to represent the escaped samples. In some embodiments, the fixed length includes N bits, where N is a positive integer. In some embodiments, N is 8 or 10.
[1102] In some embodiments, the escape samples are represented in the bitstream representation using a length determined based on the internal bit depth of the block. In some embodiments, the escape samples are represented in the bitstream representation using a length determined based on the input bit depth of the block. In some embodiments, the escape samples are represented in the bitstream representation using a length determined based on a quantization parameter of the block. In some embodiments, the length is defined as a function of the quantization parameter, denoted as f(Qp). In some embodiments, the internal bit depth of the block is d, and wherein f(Qp) = (d - (Qp - 4) / 6).
[1103] Figure 38 38 is a flowchart representation of a method 3800 for video processing according to the present technology. The method 3800 includes, at operation 3810, determining a first quantization process for a video block encoded into a bitstream representation as a block encoded in a palette mode. The first quantization process is different from a second quantization process applicable to blocks encoded in a non-palette mode. The method 3800 also includes, at operation 3820, performing a conversion between the block and the bitstream representation based on the determined step.
[1104] In some embodiments, the first quantization process includes right-bit shifting the outlier samples of the block, thereby quantizing the outlier samples. In some embodiments, the first quantization process includes left-bit shifting the outlier samples of the block, thereby inverse-quantizing the outlier samples. In some embodiments, the sample is denoted as p and the quantized sample is denoted as Qp, and wherein the value of the outlier sample is encoded as a function of p and Qp, the function being denoted as f(p, Qp). In some embodiments, f(p, Qp) = p>>((Qp-4) / 6). In some embodiments, the sample is denoted as p and the value of the outlier sample is encoded as p>>N, where N is an integer. In some embodiments, N is 2. In some embodiments, N is determined based on characteristics associated with the block.
[1105] In some embodiments, the characteristic comprises a value signaled in a sequence parameter set, a video parameter set, a picture parameter set, a picture header, a slice header, a slice group header, a largest codec unit (LCU) row, or an LCU group. In some embodiments, the characteristic comprises an internal bit depth of the block. In some embodiments, the characteristic comprises an input bit depth of the block. In some embodiments, the characteristic comprises a dimension of the block. In some embodiments, the characteristic comprises a quantization parameter of the block. In some embodiments, the characteristic comprises an indication of a color format of the block. In some embodiments, the characteristic comprises a codec tree structure of the block. In some embodiments, the characteristic comprises a slice type, slice group type, or picture type associated with the block.
[1106] In some embodiments, a sample point is represented as p, the bit depth associated with the block is represented as bd, and the quantized sample point is represented as Qp, and wherein the value of the escape sample point is signaled as a function of bd, p, and Qp, the function being represented as f(bd, p, Qp). In one example, f(bd, p, Qp) = clip(0, (1 << (bd - (Qp - 4) / 6)) - 1, (p + (1 << (bd - 1))) >> ((Qp - 4) / 6)). In some embodiments, f(bd, p, Qp) = clip(0, (1 << bd) - 1, p << ((Qp - 4) / 6)). In some embodiments, clip is defined as clip(a, i, b) = (i < a? a : (i > b? b : i)). In some embodiments, clip is defined as clip(a, i, b) = (i <= a? a : (i >= b? b : i)). In some embodiments, the bit depth includes an internal bit depth or an input bit depth.
[1107] Figure 39 A flow chart representation of a method 3900 for video processing in accordance with the present technology is shown. Method 3900 includes: at operation 3910, performing a conversion between a video including a luminance block and a corresponding chrominance block and a bit stream representation of the video in accordance with a rule. The rule specifies that if the current luminance block is encoded and decoded using a palette coding mode and the corresponding current chrominance block is encoded and decoded using a derived mode, the current luminance block is treated as having a default intra prediction mode, and the current chrominance block is encoded and decoded using the default intra prediction mode. The palette coding mode includes encoding the current luminance block using a palette of representative sample values.
[1108] In some embodiments, the current luminance block encoded and decoded using the palette coding mode is treated as an intra block. In some embodiments, the current luminance block encoded and decoded using the palette coding mode is treated as a palette block. In some embodiments, the default intra prediction mode includes a DC mode, a planar mode, a vertical mode, or a horizontal mode. In some embodiments, the default intra prediction method includes any intra prediction mode. In some embodiments, the default intra prediction mode is signaled in a dependency parameter set, a sequence parameter set, a video parameter set, a picture parameter set, an adaptation parameter set, a picture header, a slice header, a picture group header, a largest coding unit (LCU), a coding unit (CU), an LCU row, an LCU group, a transform unit (TU), a prediction unit (PU) block, or a video coding unit.
[1109] Figure 404 is a flowchart representation of a method 4000 for video processing according to the present technology. The method 4000 includes, at operation 4010, performing a conversion between a video comprising one or more blocks and a bitstream representation of the video. For the conversion, a list of motion candidates is constructed for each block according to a rule. The rule specifies that, for encoding and decoding consecutive blocks, motion information for blocks encoded using a palette encoding mode is treated as unavailable or invalid.
[1110] In some embodiments, the list of motion candidates includes a history-based motion vector prediction candidate list. In some embodiments, the list of motion candidates includes a merge candidate list. In some embodiments, the list of motion candidates includes motion vector prediction candidates.
[1111] In some embodiments, the block is treated as having an invalid reference index. In some embodiments, the block is treated as having a reference index of 0. In some embodiments, the block is treated as having a zero motion vector.
[1112] In some embodiments, whether the rule applies is based on a characteristic associated with the block. In some embodiments, the characteristic comprises the video content in the block. In some embodiments, the characteristic comprises a message signaled in a dependency parameter set, sequence parameter set, video parameter set, picture parameter set, adaptation parameter set, picture header, slice header, slice group header, largest codec unit (LCU), codec unit (CU), LCU row, LCU group, transform unit (TU), prediction unit (PU) block, or video codec unit associated with the block. In some embodiments, the characteristic comprises the location of a video region associated with the block, the video region comprising a CU, PU, TU, or video codec unit. In some embodiments, the characteristic comprises the dimensions of the block or a neighboring block. In some embodiments, the characteristic comprises the shape of the block or a neighboring block. In some embodiments, the characteristic comprises an indication of a color format for the block. In some embodiments, the characteristic comprises a codec tree structure for the block. In some embodiments, the characteristic comprises a slice type, slice group type, or picture type for the block. In some embodiments, the characteristic comprises a color component for the block. In some embodiments, the characteristic comprises a temporal layer identifier for the block.
[1113] Figure 41 A flowchart representation of a method 4100 for video processing according to the present technology is shown. The method 4100 includes, at operation 4110, determining, for a video block encoded into a bitstream representation as a codec block in a palette mode, a number of binary digits for context encoding of the block based on a rule. The method 4100 also includes, at operation 4120, performing conversion between the video block and the bitstream representation of the video based on the determination.
[1114] In some embodiments, determining the number of context-coded bins includes assigning a counter to the block to track the number of context-coded bins. In some embodiments, the counter includes a counter for tracking the number of components to be coded in the block. In some embodiments, the counter is initialized to 0 and incremented by one for each bin coded using context coding. In some embodiments, the counter is initialized to N, where N is a positive integer. The counter is decremented by one for each bin coded using context coding.
[1115] In some embodiments, the rule specifies a threshold, and the method further includes applying bypass encoding to an additional number of bins that exceed or fall short of the threshold. In some embodiments, the threshold is 0 or 1. In some embodiments, the threshold is determined based on a number of encoding and decoding processes for the block or decoded information for the block.
[1116] In some embodiments, the threshold is determined based on a second threshold associated with the number of binary digits of context encoding for a block of transport stream encoding or a block of non-TS encoding. In some embodiments, the second threshold is denoted as T, where T is a positive integer. The rule specifies that the threshold is W×H×T, where W is the width of the block and H is the height of the block. In some embodiments, the second threshold is denoted as T, where T is a positive integer. The rule specifies that the threshold is W×H×C×T, where W is the width of the block, H is the height of the block, and C is the number of color components to be encoded and decoded in the block. In some embodiments, T is 1.75 or 2. In some embodiments, the threshold is less than the second threshold. In some embodiments, the threshold is greater than the second threshold.
[1117] Figure 42 is a flowchart representation of a method 4200 for video processing according to the present technology. The method 4200 includes, at operation 4210, determining, for a conversion between a current block of a video and a bitstream representation of the video, a number of neighboring blocks of the current block that are intra-coded for a combined inter- and intra-prediction mode according to a rule. The rule specifies how to treat blocks that were encoded using a palette codec mode in counting the number of neighboring blocks that were intra-coded for a combined inter- and intra-prediction mode, wherein the palette codec mode includes encoding the block using a palette of representative sample values. The method 4200 also includes, at operation 4220, performing the conversion based on the determined step.
[1118] In some embodiments, this mode specifies that blocks encoded using the palette codec mode are treated as non-intra-coded blocks, thereby excluding them from counting the number of intra-coded neighboring blocks. In some embodiments, blocks encoded using the palette codec mode are treated as blocks with the MODE_PLT prediction mode. In some embodiments, blocks encoded using the palette codec mode are treated as inter-coded blocks. In some embodiments, blocks encoded using the palette codec mode are treated as blocks encoded using the intra block copy (IBC) codec mode, in which the current block is encoded using samples from the current picture of the current block. In some embodiments, the block encoded using the palette codec mode is a neighboring block located above or to the left of the current block.
[1119] In some embodiments, this approach specifies that blocks encoded using the palette codec mode are treated as intra-coded blocks, and thus included in the count of the number of intra-coded neighboring blocks.
[1120] Figure 43 4 is a flowchart representation of a method 4300 for video processing according to the present technology. The method 4300 includes, at operation 4310, determining, for a conversion between a current block of video and a bitstream representation of the video, to skip operations on samples of the current block during filtering. The samples are encoded using a palette codec mode, wherein using the palette codec mode includes encoding and decoding the block using a palette of representative sample values. The method 4300 also includes, at operation 4320, performing the conversion based on the determined step.
[1121] In some embodiments, the operation comprises a deblocking operation to smooth one or more boundaries of the current block. In some embodiments, the operation comprises compensating for offsets in a sample adaptive offset process, wherein the samples are sorted to reduce distortion in the sample adaptive offset process. In some embodiments, the operation comprises a filtering operation in an adaptive loop filtering process. In some embodiments, the operation comprises a classification operation in an adaptive loop filtering process. In some embodiments, the operation comprises a luma mapping and chroma scaling operation, wherein in the luma mapping and chroma scaling, luma samples are mapped using an adaptive piecewise linear model and chroma samples are subjected to a luma-dependent chroma residual scaling operation.
[1122] Figure 444 is a flowchart representation of a method 4400 for video processing according to the present technology. The method 4400 includes, at operation 4410, determining a scan order selected from three or more scan orders for converting between a block of video and a bitstream representation of the video. The block is encoded or decoded in palette mode using a palette of representative sample values. The method 4400 includes, at operation 4420, performing the conversion based on the determined step.
[1123] In some embodiments, the three or more scanning orders include a reverse horizontal traversal scanning order. In some embodiments, the reverse horizontal traversal scanning order includes scanning the block from left to right for rows with odd indices, wherein the first row of the block is assigned an index of 0. In some embodiments, the reverse horizontal traversal scanning order includes scanning the block from right to left for rows with even indices, wherein the first row of the block is assigned an index of 0.
[1124] In some embodiments, the three or more scanning orders include a reverse vertical traversal scanning order. In some embodiments, the reverse vertical traversal scanning order includes scanning the block from top to bottom for columns with odd indices, wherein the first column of the block is assigned an index of 0. In some embodiments, the reverse vertical traversal scanning order includes scanning the block from bottom to top for columns with even indices, wherein the first column of the block is assigned an index of 0.
[1125] In some embodiments, the three or more scanning orders include a horizontal traversal scanning order that scans the coefficients of the block from left to right for rows with even indices and scans the coefficients of the block from right to left for rows with odd indices. The three or more scanning orders also include a vertical traversal scanning order that scans the coefficients of the block from top to bottom for rows with even indices and scans the coefficients of the block from bottom to top for rows with odd indices, wherein the first row of the block is assigned index 0 and the first column of the block is assigned index 0.
[1126] Figure 45 4 is a flowchart representation of a method 4500 for video processing according to the present technology. The method 4500 includes, at operation 4510, determining one or more scan orders for converting between a block of video and a bitstream representation of the video, wherein coefficients of the block are scanned in the one or more scan orders based on the shape of the block. The method 4500 also includes, at operation 4520, performing the conversion based on the determined step.
[1127] In some embodiments, the one or more scanning orders are applied if the ratio of the width to the height of the block is greater than a threshold. In some embodiments, the one or more scanning orders are applied if the ratio of the height to the width of the block is greater than a threshold. In some embodiments, the threshold is equal to 1. In some embodiments, the threshold is equal to 4.
[1128] Figure 46 4 is a flowchart representation of a method 4600 for video processing according to the present technology. The method 4600 includes, at operation 4610, determining, for conversion between a block of video and a bitstream representation of the video, a unique scanning order to apply to the block for a block-based quantized residual domain differential pulse coding modulation (BDPCM) process, wherein coefficients of the block are scanned in the unique scanning order, and representing a difference between a quantized residual of an intra prediction of the block and a prediction of the quantized residual in the bitstream representation of the block using differential pulse coding modulation (DPCM) in the BDPCM process. The method 4600 also includes, at operation 4620, performing the conversion based on the determined step.
[1129] In some embodiments, if the width of the block is greater than the height of the block, then the unique scanning order comprises scanning the block in a vertical direction. In some embodiments, if the width of the block is less than the height of the block, then the unique scanning order comprises scanning the block in a horizontal direction. In some embodiments, the unique scanning order is derived based on the shape of the block.
[1130] In some embodiments, at least one scanning order is applicable if the width of the block, denoted as W, and the height of the block, denoted as H, meet a condition. In some embodiments, the condition includes W×Th≥H or H×Th≥W, where Th is a threshold value, and the threshold value is an integer. In some embodiments, Th is 4 or 8. In some examples, Th is determined based on a characteristic of the video. In some embodiments, the characteristic includes the content of the video. In some embodiments, the characteristic includes information signaled in a decoder parameter set, a slice parameter set, a video parameter set, a picture parameter set, an adaptation parameter set, a picture header, a slice header, a slice group header, a largest codec unit (LCU), a codec unit (CU), an LCU row, an LCU group, a tree unit (TU), a picture unit (PU) block, or a video codec unit represented in the bitstream. In some embodiments, the characteristic includes the position of the block in a video picture of the video. In some embodiments, the characteristic includes the dimensions of the block or the dimensions of its neighboring blocks. In some embodiments, the characteristic includes the shape of the block or the shapes of its neighboring blocks. In some embodiments, the characteristic includes the color format of the block. In some embodiments, the characteristic includes the codec tree structure of the video. In some embodiments, the characteristic comprises a slice type, slice group type, or picture type of the video. In some embodiments, the characteristic comprises a color component of the block. In some embodiments, the characteristic comprises a temporal layer identity of the video. In some embodiments, the characteristic comprises a standard grade, level, or hierarchy for the video.
[1131] In some embodiments, the conversion generates a bitstream representation of the current block. In some embodiments, the conversion generates a bitstream representation of the current block.
[1132] Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or mode. In one example, when a video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of the video block, but will not necessarily modify the resulting bitstream based on the use of the tool or mode. That is, when the video processing tool or mode is enabled based on the decision or determination, the conversion from the video block to the bitstream representation of the video uses the video processing tool or mode. In another example, when the video processing tool or mode is enabled, the decoder processes the bitstream knowing that the bitstream has been modified based on the video processing tool or mode. That is, the conversion from the bitstream representation of the video to the video block is performed using the video processing tool or mode enabled based on the decision or determination.
[1133] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In one example, when a video processing tool or mode is disabled, the encoder does not use the tool or mode in converting video blocks to a bitstream representation of the video. In another example, when a video processing tool or mode is disabled, the decoder processes the bitstream knowing that no modifications have been made to the bitstream using the video processing tool or mode enabled based on the decision or determination.
[1134] The disclosed and other solutions, examples, embodiments, modules, and functional operations described in this document can be implemented in digital electronic circuitry or computer software, firmware, or hardware, including the structures disclosed herein and their structural equivalents, or any combination 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 a data processing apparatus or to control the operation of the data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a storage device, a composition of matter that effects a machine-readable propagated signal, or any combination 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. In addition to hardware, the apparatus may also include 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 any combination thereof. A propagated signal is an artificially generated signal, such as a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to a suitable receiver device.
[1135] A computer program (also referred to as a program, software, software application, script, or code) can be written in any form of programming language (including compiled or interpreted languages) and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program 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, or in multiple coordinated files (e.g., files that store one or more modules, subroutines, or code portions). A computer program can be deployed to execute on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communications network.
[1136] The processes and logic flows described in this specification can 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. These processes and logic flows can also be performed by, and the apparatus can be implemented as, a dedicated logic circuit (e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit)).
[1137] For example, processors suitable for executing computer programs include general-purpose and special-purpose microprocessors, as well as any one or more processors of any kind of digital computer. Typically, a processor will receive instructions and data from a read-only memory or a random-access memory, or both. The essential elements of a computer are a processor that executes instructions and one or more memory devices that store instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic, magneto-optical, or optical disks, or be operatively coupled to receive data from or transfer data to one or more mass storage devices, or both. However, a computer need not have such devices. Computer-readable media suitable for storing computer program instructions and data include all forms of nonvolatile memory, media, and storage devices, including, for example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD ROM and DVD ROM disks. The processor and memory may be supplemented by, or incorporated into, special-purpose logic circuitry.
[1138] Although this patent document includes many details, these should not be interpreted as limitations on any subject matter or the scope of what is claimed, but rather as descriptions of features that may be specific to a particular embodiment of a particular technology. 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 described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable subcombination. Furthermore, although features may be described above as working in certain combinations, and even initially claimed as such, in some cases one or more features in the claimed combination may be removed from the combination, and the claimed combination may be directed to a subcombination or variation of the subcombination.
[1139] Similarly, while operations are depicted in a particular order in the drawings, this should not be understood as requiring that these operations be performed in the particular order shown or in sequential order, or that all illustrated operations 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.
[1140] Only a few implementations and examples are described, and other implementations, enhancements, and variations can be made based on what is described and illustrated in this patent document.
Claims
1. A method for video processing, comprising: determining, for conversion between a block of video and a bitstream of the video, one or more scan orders selected from three or more scan orders based on a shape of the block, wherein the block is encoded or decoded in palette mode using a palette of representative sample values; and Based on the determination, performing the conversion, Wherein, when the block is a luminance block and the palette mode is enabled for the block, a coding tool is not applied to the block, the coding tool including at least one of a mapping process and a scaling process based on a piecewise linear model.
2. The method according to claim 1, wherein The three or more scanning orders include a reverse horizontal traversal scanning order.
3. The method according to claim 2, wherein: The reverse horizontal traversal scan order includes scanning the block from left to right for rows with odd indices, where the first row of the block is assigned index 0.
4. The method according to claim 2, wherein: The reverse horizontal traversal scan order includes scanning the block from right to left for rows with even indices, where the first row of the block is assigned index 0.
5. The method according to claim 1, wherein The three or more scanning orders include a reverse vertical traversal scanning order.
6. The method according to claim 5, wherein: The reverse vertical traversal scan order includes scanning the block from top to bottom for columns having odd indices, wherein the first column of the block is assigned index 0.
7. The method according to claim 5, wherein: The reverse vertical traversal scan order includes scanning the block from bottom to top for columns having even indices, wherein the first column of the block is assigned index 0.
8. The method according to any one of claims 1 to 7, wherein The three or more scanning orders include a horizontal traversal scanning order that scans coefficients of the block from left to right for rows with even indices and from right to left for rows with odd indices, and The three or more scanning orders further include a vertical traversal scanning order that scans the coefficients of the block from top to bottom for columns having even indices and from bottom to top for columns having odd indices, The first row of the block is assigned an index of 0, and the first column of the block is assigned an index of 0.
9. The method according to claim 1, wherein If a ratio of the width to the height of the block is greater than a threshold, the one or more scanning orders are applied.
10. The method according to claim 1, wherein If a ratio of the height to the width of the block is greater than a threshold, the one or more scanning orders are applied.
11. The method according to claim 9 or 10, wherein: The threshold is equal to 1.
12. The method according to claim 9 or 10, wherein: The threshold is equal to 4.
13. The method according to claim 1, further comprising: For a quantized residual block differential pulse coding modulation (QR-BDPCM) process, a unique scanning order is determined to be applied to the block, wherein the coefficients of the block are scanned in the unique scanning order, and in the QR-BDPCM process, a difference between a quantized residual of an intra-frame prediction of the block and a prediction of the quantized residual is represented in the bitstream of the block using differential pulse coding modulation (DPCM).
14. The method according to claim 13, wherein If the width of the block is greater than the height of the block, the unique scanning order includes scanning the block in a vertical direction.
15. The method according to claim 13, wherein If the width of the block is less than the height of the block, the unique scanning order includes scanning the block in a horizontal direction.
16. The method according to any one of claims 13 to 15, wherein The unique scanning order is derived based on the shape of the block.
17. The method according to any one of claims 1 to 7, 9-10, 13-15, wherein At least one scanning order is applicable if the width of the block, denoted as W, and the height of the block, denoted as H, meet conditions.
18. The method according to claim 17, wherein The conditions include W×Th≥H or H×Th≥W, Th is a threshold value, and the threshold value is an integer.
19. The method according to claim 18, wherein Th is 4 or 8.
20. The method according to claim 18, wherein Th is determined based on the characteristics of the video.
21. The method according to claim 20, wherein The characteristics include the content of the video.
22. The method according to claim 20, wherein The characteristics include information signaled in a decoder parameter set, a slice parameter set, a video parameter set, a picture parameter set, an adaptation parameter set, a picture header, a slice header, a slice group header, a largest codec unit (LCU), a codec unit (CU), an LCU row, an LCU group, a tree unit (TU), a picture unit (PU) block, or a video codec unit of the bitstream.
23. The method according to claim 20, wherein The characteristics include the location of the block in a video picture of the video.
24. The method according to claim 20, wherein The characteristics include the dimensions of the block or the dimensions of neighboring blocks of the block.
25. The method according to claim 20, wherein The characteristics include the shape of the block or the shapes of neighboring blocks of the block.
26. The method according to claim 20, wherein The characteristics include a color format of the block.
27. The method according to claim 20, wherein The characteristics include a codec tree structure of the video.
28. The method according to claim 20, wherein The characteristics include a slice type, a slice group type, or a picture type of the video.
29. The method according to claim 20, wherein The characteristics include color components of the block.
30. The method according to claim 20, wherein The characteristics include a temporal layer identity of the video.
31. The method according to claim 20, wherein The characteristics include the profile, level, and layer of the standards used for the video.
32. The method according to any one of claims 1 to 7, 9-10, 13-15, wherein The converting includes generating the blocks from the bitstream.
33. The method according to any one of claims 1 to 7, 9-10, 13-15, wherein The converting includes generating the bitstream from the block.
34. A video processing device comprising a processor, wherein the processor is configured to implement the method according to any one of claims 1 to 33.
35. A computer readable medium having stored thereon code which, when executed, causes a processor to implement the method according to any one of claims 1 to 33.
Citation Information
Patent Citations
Improved palette coding for screen content coding
CN106797469A
Method and device for processing video signal
CN109661819A
Data encoding and decoding
US20160241852A1