Method and apparatus for video coding using palette mode

By using palette mode in video encoding and decoding, the problem of efficient encoding and decoding of high-resolution video data is solved, achieving more efficient video data processing and maintaining image quality.

CN118741092AActive Publication Date: 2024-10-01BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411015786.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2020-01-11
Filing Date
2021-01-11
Publication Date
2024-10-01
Estimated Expiration
2041-01-11

AI Technical Summary

Technical Problem

Existing video encoding and decoding technology is difficult to achieve more efficient encoding and decoding of video data while maintaining image quality. Especially when processing high-resolution video data (such as 4K×2K or 8K×4K), the encoding/decoding efficiency is low. .

Method used

Video encoding and decoding is performed using palette mode by receiving syntax elements from the bitstream, determining the size of the coding unit and coding tree type, enabling palette mode, and decoding the video data according to the palette mode flag.

Benefits of technology

It improves the encoding and decoding efficiency of video data, reduces the number of transmitted bits, and enhances the processing capabilities of high-resolution video data while maintaining image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741092A_ABST
    Figure CN118741092A_ABST
Patent Text Reader

Abstract

An electronic device performs a method of decoding video data. The method includes receiving a plurality of syntax elements associated with a coding unit from a bitstream, where the plurality of syntax elements indicate a size of the coding unit and a coding tree type of the coding unit; determining a minimum palette mode block size for the coding unit according to a coding tree type of the coding unit; in accordance with a determination that the size of the coding unit is greater than the minimum palette mode block size: receiving a palette mode enable flag associated with the coding unit from the bitstream; and decoding the coding unit from the bitstream according to the palette mode enable flag.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Chinese patent application No. 202180019765.8, which is a Chinese national phase application of international patent application PCT / US2021 / 012964 filed on January 11, 2021, and which claims priority to U.S. patent application No. 62 / 959,913 filed on January 11, 2020. Technical Field

[0002] The present application relates generally to video data encoding and compression, and in particular, to methods and systems for video encoding and decoding using palette modes. Background Art

[0003] Various electronic devices such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc. support digital video. Electronic devices send, receive, encode, decode and / or store digital video data by implementing video compression / decompression standards defined by MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), High Efficiency Video Codec (HEVC) and Versatile Video Codec (VVC) standards. Video compression typically includes performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove redundancy inherent in video data. For block-based video codecs, a video frame is divided into one or more slices, each with multiple video blocks, which may also be referred to as coding tree units (CTUs). Each CTU may contain a coding unit (CU) or be recursively divided into smaller CUs until a preset minimum CU size is reached. Each CU (also called a leaf-CU) contains one or more transform units (TUs), and each CU also contains one or more prediction units (PUs). Each CU can be coded in intra, inter, or IBC mode. Video blocks in an intra-coded (I) slice of a video frame are coded using spatial prediction relative to reference samples in neighboring blocks in the same video frame. Video blocks in an inter-coded (P or B) slice of a video frame can use spatial prediction relative to reference samples in neighboring blocks in the same video frame or temporal prediction relative to reference samples in other previous and / or future reference video frames.

[0004] A prediction block for the current video block to be coded is generated based on spatial or temporal prediction of a previously coded reference block (e.g., a neighboring block). The process of finding a reference block can be accomplished by a block matching algorithm. The residual data representing the pixel difference between the current block to be coded and the prediction block is called a residual block or a prediction error. The inter-coded block is encoded according to a motion vector pointing to a reference block in a reference frame forming the prediction block, and a residual block. The process of determining a motion vector is typically referred to as motion estimation. The intra-coded block is encoded according to an intra-frame prediction mode and a residual block. For further compression, the residual block is transformed from a pixel domain to a transform domain, such as a frequency domain, thereby generating residual transform coefficients, which can then be quantized. The quantized transform coefficients, which are initially arranged as a two-dimensional array, can be scanned to generate a one-dimensional vector of transform coefficients, and then entropy encoded into a video bitstream to achieve more compression.

[0005] The encoded video bitstream is then stored in a computer-readable storage medium (e.g., a flash memory) to be accessed by another electronic device with digital video capabilities, or directly transmitted to the electronic device in a wired or wireless manner. The electronic device then performs video decompression (which is the reverse process of the video compression described above) by, for example, parsing the encoded video bitstream to obtain syntax elements from the bitstream and reconstructing digital video data from the encoded video bitstream to its original format based at least in part on the syntax elements obtained from the bitstream, and rendering the reconstructed digital video data on a display of the electronic device.

[0006] As the quality of digital video increases from HD to 4K×2K or even 8K×4K, the amount of video data to be encoded / decoded increases exponentially. There has always been a challenge in how to encode / decode video data more efficiently while maintaining the image quality of the decoded video data. Summary of the invention

[0007] The present application describes embodiments related to encoding and decoding of video data, and more particularly, describes embodiments related to systems and methods for encoding and decoding video using palette modes.

[0008] According to the first aspect of the present application, a method for decoding video data includes: receiving multiple syntax elements associated with a coding unit from a bitstream, wherein the multiple syntax elements indicate the size of the coding unit and the coding tree type of the coding unit; determining a minimum palette mode block size for the coding unit according to the coding tree type of the coding unit; based on determining that the size of the coding unit is greater than the minimum palette mode block size: receiving a palette mode enable flag associated with the coding unit from the bitstream; and decoding the coding unit from the bitstream according to the palette mode enable flag.

[0009] According to a second aspect of the present application, an electronic device comprises one or more processing units, a memory and a plurality of programs stored in the memory. When the programs are executed by the one or more processing units, the electronic device performs the method for decoding video data as described above.

[0010] According to a third aspect of the present application, a non-transitory computer-readable storage medium stores a plurality of programs for execution by an electronic device having one or more processing units. When the programs are executed by the one or more processing units, the electronic device executes the method for decoding video data as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings, which are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of the specification, illustrate the described embodiments and together with the description serve to explain the basic principles. Like reference numerals refer to corresponding parts.

[0012] Figure 1 is a block diagram illustrating an exemplary video encoding and decoding system according to some embodiments of the present disclosure.

[0013] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0014] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0015] FIG. 4A to FIG. 4E is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.

[0016] FIG. 5A to FIG. 5D is a block diagram illustrating an example of encoding and decoding video data using a palette table according to some embodiments of the present disclosure.

[0017] Figure 6 is a flow chart illustrating an exemplary process by which a video decoder implements techniques for decoding video data according to some embodiments of the present disclosure.

[0018] Figure 7 is a block diagram illustrating an example Context Adaptive Binary Arithmetic Coding and Decoding (CABAC) engine according to some implementations of the present disclosure. DETAILED DESCRIPTION

[0019] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used without departing from the scope of the claims, and that the subject matter may be practiced without these specific details. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0020] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown, system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14. Source device 12 and destination device 14 may include any of a variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.

[0021] In some embodiments, the destination device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the destination device 14. In one example, the link 16 may include a communication medium for enabling the source device 12 to transmit the encoded video data directly to the destination device 14 in real time. The encoded video data may be modulated and transmitted to the destination device 14 according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that may be used to facilitate communication from the source device 12 to the destination device 14.

[0022] In some other embodiments, the encoded video data may be transferred from the output interface 22 to a storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the destination device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a DVD, a CD-ROM, a flash memory, a volatile memory or a non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In a further example, the storage device 32 may correspond to a file server or another intermediate storage device that can hold the encoded video data generated by the source device 12. The destination device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and transmitting the encoded video data to the destination device 14. Exemplary file servers include a web server (e.g., for a website), an FTP server, a network attached storage (NAS) device, or a local disk drive. The destination device 14 may access the encoded video data through any standard data connection, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on a file server. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both.

[0023] like Figure 1 As shown, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include a source such as a video capture device, such as a camera, a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as a source video, or a combination of such sources. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and destination device 14 may form a camera phone or a video phone. However, the embodiments described in the present application may be generally applicable to video encoding and decoding and may be applied to wireless and / or wired applications.

[0024] Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be transmitted directly to destination device 14 via output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by destination device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.

[0025] Destination device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data over link 16. The encoded video data transmitted over link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use in decoding the video data by video decoder 30. Such syntax elements may be included within the encoded video data transmitted over the communication medium, stored on the storage medium, or stored in a file server.

[0026] In some implementations, destination device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with destination device 14. Display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0027] The video encoder 20 and the video decoder 30 may operate in accordance with a proprietary or industry standard such as VVC, HEVC, MPEG-4 Part 10, Advanced Video Codec (AVC), or an extension of such a standard. It should be understood that the present application is not limited to a particular video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally contemplated that the video encoder 20 of the source device 12 may be configured to encode video data in accordance with any of these current or future standards. Similarly, it is also generally contemplated that the video decoder 30 of the destination device 14 may be configured to decode video data in accordance with any of these current or future standards.

[0028] The video encoder 20 and the video decoder 30 can each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When implemented partially in software, the electronic device can store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device.

[0029] Figure 2is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described herein. The video encoder 20 may perform intra-frame prediction encoding and inter-frame prediction encoding of video blocks within a video frame. Intra-frame prediction encoding relies on spatial prediction to reduce or remove spatial redundancy of video data within a given video frame or picture. Inter-frame prediction encoding relies on temporal prediction to reduce or remove temporal redundancy of video data within adjacent video frames or pictures of a video sequence.

[0030] like Figure 2 As shown, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A deblocking filter (not shown) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. A loop filter (not shown) other than the deblocking filter may also be used to filter the output of the adder 62. The video encoder 20 may take the form of a fixed or programmable hardware unit, or may be divided into one or more of the illustrated fixed or programmable hardware units.

[0031] The video data memory 40 may store video data to be encoded by components of the video encoder 20. The video data in the video data memory 40 may be obtained, for example, from the video source 18. The DPB 64 is a buffer that stores reference video data for encoding the video data by the video encoder 20 (e.g., in an intra-frame prediction coding mode or an inter-frame prediction coding mode). The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various examples, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0032] like Figure 2As shown, after receiving the video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. The partitioning may also include partitioning the video frame into strips, tiles, or other larger coding units (CUs) according to a preset partitioning structure (such as a quadtree structure associated with the video data). The video frame may be divided into a plurality of video blocks (or sets of video blocks referred to as tiles). The prediction processing unit 41 may select one of a plurality of possible prediction coding modes for the current video block based on the error result (e.g., coding rate and distortion level), such as one of a plurality of intra-frame prediction coding modes or one of a plurality of inter-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information to the entropy coding unit 56.

[0033] In order to select an appropriate intra-frame prediction coding mode for the current video block, the intra-frame prediction processing unit 46 within the prediction processing unit 41 can perform intra-frame prediction coding on the current video block relative to one or more neighboring blocks in the same frame as the current block to be encoded and decoded to provide spatial prediction. The motion estimation unit 42 and the motion compensation unit 44 within the prediction processing unit 41 perform inter-frame prediction coding on the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. The video encoder 20 can perform multiple encoding passes, for example, to select an appropriate encoding mode for each block of video data.

[0034] In some embodiments, motion estimation unit 42 determines the inter-prediction mode of the current video frame according to a predetermined pattern within the sequence of video frames by generating a motion vector that indicates the displacement of a prediction unit (PU) of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors that estimates the motion of video blocks. The motion vector may, for example, indicate the displacement of a PU of a video block within the current video frame or picture relative to a prediction block (or other coded unit) within a reference frame relative to a current block (or other coded unit) coded within the current frame. The predetermined pattern may designate video frames in the sequence as P frames or B frames. Intra BC unit 48 may determine a vector, e.g., a block vector, for intra BC coding in a manner similar to the manner in which motion estimation unit 42 determines motion vectors for inter prediction, or may utilize motion estimation unit 42 to determine a block vector.

[0035] A prediction block is a block of a reference frame that is considered to closely match the PU of the video block to be encoded in terms of pixel difference, which can be determined by the sum of absolute difference (SAD), the sum of squared difference (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate the values ​​of sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may insert values ​​of quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and the fractional pixel positions and output a motion vector with fractional pixel accuracy.

[0036] Motion estimation unit 42 calculates a motion vector for a PU of a video block in an inter-prediction coded frame by comparing the position of the PU to the position of a prediction block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0037] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector of the PU of the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, obtain the prediction block from the DPB 64 and forward the prediction block to the adder 50. The adder 50 then forms a residual video block with pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include luma metric differences or chroma metric differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying the prediction block, any flag indicating a prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes.

[0038] In some embodiments, the intra BC unit 48 may generate a vector and obtain a prediction block in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but wherein the prediction block is in the same frame as the current block being encoded, and wherein the vector is referred to as a block vector relative to the motion vector. Specifically, the intra BC unit 48 may determine an intra prediction mode for encoding the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during a separate encoding pass, and test its performance by rate-distortion analysis. Next, the intra BC unit 48 may select an appropriate intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate a rate-distortion value using rate-distortion analysis for the various tested intra prediction modes and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as the appropriate intra prediction mode to be used. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original, uncoded block (coded to produce the coded block) and the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate a ratio from the distortion and rate for each coded block to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0039] In other examples, intra BC unit 48 may use motion estimation unit 42 and motion compensation unit 44 in whole or in part to perform such functions for intra BC prediction according to embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel difference, which may be determined by sum of absolute difference (SAD), sum of squared difference (SSD), or other difference metrics, and identification of the prediction block may include calculating values ​​for sub-integer pixel positions.

[0040] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from different frames according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded, thereby forming pixel difference values. The pixel difference values ​​forming the residual video block may include luma component differences and chroma component differences.

[0041] As described above, the intra-prediction processing unit 46 may perform intra-prediction on the current video block as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra-block copy prediction performed by the intra BC unit 48. Specifically, the intra-prediction processing unit 46 may determine an intra-prediction mode for encoding the current block. To this end, the intra-prediction processing unit 46 may encode the current block using various intra-prediction modes, for example, during separate encoding passes, and the intra-prediction processing unit 46 (or the mode selection unit in some examples) may select an appropriate intra-prediction mode from the tested intra-prediction modes to use. The intra-prediction processing unit 46 may provide information indicating the selected intra-prediction mode of the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in the bitstream.

[0042] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more transform units (TUs) and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.

[0043] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0044] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques. The encoded bitstream may then be transmitted to video decoder 30 or archived in storage device 32 for later transmission to or retrieval by video decoder 30. Entropy coding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

[0045] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain to generate a reference block for predicting other video blocks. As described above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0046] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0047] Figure 3 1 is a block diagram illustrating an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction processing unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform operations generally in conjunction with the above. Figure 2 The decoding process is the reverse of the encoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0048] In some examples, units of the video decoder 30 may be assigned tasks to perform embodiments of the present application. Likewise, in some examples, embodiments of the present disclosure may be divided between one or more units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction processing unit 84, and the entropy decoding unit 80. In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.

[0049] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. For example, the video data stored in the video data memory 79 may be obtained from the storage device 32, a local video source (such as a camera) via a wired or wireless network transmission of the video data or by accessing a physical data storage medium (e.g., a flash drive or a hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. A decoded picture buffer (DPB) 92 of the video decoder 30 stores reference video data for use in decoding the video data by the video decoder 30 (e.g., in an intra-frame prediction coding mode or an inter-frame prediction coding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as a dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 3 92 are depicted as two distinct components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or by separate memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or off-chip relative to those components.

[0050] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or at the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors or intra-prediction mode indicators and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors and other syntax elements to the prediction processing unit 81.

[0051] When a video frame is encoded as an intra-frame prediction coded (I) frame or as an intra-frame coded prediction block in other types of frames, the intra-frame prediction processing unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the signaled intra-frame prediction mode and reference data from a previously decoded block of the current frame.

[0052] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks of the video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each prediction block can be generated from a reference frame within one of the reference frame lists. The video decoder 30 can construct the reference frame lists: List 0 and List 1 based on the reference frames stored in the DPB 92 using a default construction technique.

[0053] In some examples, when a video block is encoded or decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block defined by video encoder 20.

[0054] The motion compensation unit 82 and / or the intra BC unit 85 determine the prediction information of the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate the prediction block of the decoded current video block. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) used to encode the video block of the video frame, the inter prediction frame type (e.g., B or P), the construction information of one or more reference frame lists in the reference frame list of the frame, the motion vector of each inter prediction encoded video block of the frame, the inter prediction state of each inter prediction encoded video block of the frame, and other information used to decode the video block in the current video frame.

[0055] Similarly, the intra BC unit 85 may use some of the received syntax elements (e.g., flags) to determine that the current video block is predicted using the intra BC mode, construction information that the video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.

[0056] Motion compensation unit 82 may also perform interpolation using interpolation filters to calculate interpolated values ​​for sub-integer pixels of a reference block, as used by video encoder 20 during encoding of the video block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use the interpolation filters to produce a prediction block.

[0057] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0058] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block of the current video block by summing the residual block from the inverse transform processing unit 88 and the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter (not shown) may be positioned between the adder 90 and the DPB 92 to further process the decoded video block. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display such as a video player. Figure 1 On a display device such as a display device 34.

[0059] In a typical video encoding and decoding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other examples, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0060] like Figure 4A As shown, the video encoder 20 (or more specifically, the partitioning unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of coding tree units (CTUs). A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, i.e., one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 4BAs shown, each CTU may include one coding tree block (CTB) of luma samples, two corresponding coding tree blocks of chroma samples, and syntax elements for encoding and decoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of coding blocks of pixels and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vector and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding and decoding samples of the coding tree block. The coding tree block may be an N×N sample block.

[0061] To achieve better performance, the video encoder 20 may recursively perform tree partitioning such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination of both on the coding tree block of the CTU and divide the CTU into smaller coding units (CUs). Figure 4C As shown, a 64×64 CTU 400 is first divided into four smaller CUs, each with a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four 16×16 CUs by block size. Two 16×16 CUs 430 and 440 are each further divided into four 8×8 CUs by block size. Figure 4D Depicted diagram Figure 4C The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 is shown in FIG. 4 , where each leaf node of the quadtree corresponds to a CU with a corresponding size ranging from 32×32 to 8×8. Figure 4B In the depicted CTU, each CU may include a coding block (CB) of luma samples and two corresponding coding blocks of chroma samples of the same size frame, as well as syntax elements for encoding and decoding the samples of the coding blocks. In monochrome pictures or pictures with three separate color planes, a CU may include a single coding block and syntax structures for encoding and decoding the samples of the coding block. It should be noted that Figure 4C and Figure 4D The quadtree partitioning depicted in FIG is for illustration purposes only, and a CTU can be split into multiple CUs to accommodate different local characteristics based on quadtree / ternary tree / binary tree partitioning. In the multi-type tree structure, a CTU is divided by a quadtree structure, and each quadtree leaf CU can be further divided by a binary tree structure or a ternary tree structure. Figure 4E As shown, there are five types of partitioning, namely, quadruple partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.

[0062] In some embodiments, the video encoder 20 may further divide the coding block of the CU into one or more M×N prediction blocks (PBs). A prediction block is a rectangular (square or non-square) block of samples to which the same prediction (inter or intra) is applied. The prediction unit (PU) of a CU may include a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and syntax elements for predicting the prediction blocks. In a monochrome picture or a picture with three separate color planes, a PU may include a single prediction block and a syntax structure for predicting the prediction block. The video encoder 20 may generate predicted luma, Cb, and Cr blocks for the luma, Cb, and Cr prediction blocks of each PU of the CU.

[0063] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0064] After the video encoder 20 generates the predicted luma, Cb, and Cr blocks of one or more PUs of a CU, the video encoder 20 may generate a luma residual block of the CU by subtracting the predicted luma block of the CU from its original luma coding block, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block of the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0065] In addition, if Figure 4CAs illustrated, the video encoder 20 may use quadtree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A transform unit (TU) of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.

[0066] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block of the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block of the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block of the TU.

[0067] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to the process of quantizing the transform coefficients to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode the syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform context-adaptive binary arithmetic coding and decoding (CABAC) on the syntax elements indicating the quantized transform coefficients. Ultimately, the video encoder 20 may output a bitstream including a sequence of bits forming a representation of the encoded frame and associated data, which is stored in the storage device 32 or transmitted to the destination device 14.

[0068] After receiving the bitstream generated by the video encoder 20, the video decoder 30 can parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 can reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing video data is generally the opposite of the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block of the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block of each CU of the frame, the video decoder 30 can reconstruct the frame.

[0069] As described above, video codecs mainly use two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction) to achieve video compression. Palette-based codecs are another codec scheme adopted by many video codec standards. In palette-based codecs that may be particularly suitable for screen-generated content codecs, a video codec (e.g., video encoder 20 or video decoder 30) forms a palette table representing the color of a given block of video data. The palette table includes the most dominant (e.g., frequently used) pixel values ​​in a given block. Pixel values ​​that are not frequently represented in the video data of a given block are not included in the palette table, or are included in the palette table as escape colors.

[0070] Each entry in the palette table includes an index to the corresponding pixel value in the palette table. The palette index of the sample in the block can be encoded and decoded to indicate which entry in the palette table is to be used to predict or reconstruct which sample. The palette mode begins with the process of generating a palette prediction value for the first block of a picture, strip, tile, or other such grouping of video blocks. As will be explained below, the palette prediction values ​​for subsequent video blocks are typically generated by updating the previously used palette prediction values. For purposes of illustration, it is assumed that the palette prediction values ​​are defined at the picture level. In other words, a picture may include multiple coding blocks, each with its own palette table, but there is one palette prediction value for the entire picture.

[0071] In order to reduce the bits required to signal palette entries in a video bitstream, a video decoder can utilize a palette prediction value to determine a new palette entry in a palette table to reconstruct a video block. For example, the palette prediction value may include palette entries from a previously used palette table, or may even be initialized with a most recently used palette table by including all entries of the most recently used palette table. In some embodiments, the palette prediction value may include less than all entries from the most recently used palette table, and then combine some entries from other previously used palette tables. The palette prediction value may have the same size as the palette table used to encode and decode a different block, or may be larger or smaller than the palette table used to encode and decode a different block. In one example, the palette prediction value is implemented as a first-in, first-out (FIFO) table including 64 palette entries.

[0072] To generate a palette table for a block of video data from palette prediction values, a video decoder may receive a one-bit flag for each entry of a palette prediction value from an encoded video bitstream. The one-bit flag may have a first value (e.g., a binary one) indicating that an associated entry of the palette prediction value is to be included in the palette table or a second value (e.g., a binary zero) indicating that an associated entry of the palette prediction value is not to be included in the palette table. If the size of the palette prediction value is larger than the palette table for the block of video data, the video decoder may stop receiving more flags once a maximum size of the palette table is reached.

[0073] In some embodiments, some entries in the palette table can be directly signaled in the encoded video bitstream instead of being determined using palette prediction values. For such entries, the video decoder can receive three separate m-bit values ​​from the encoded video bitstream, the m-bit values ​​indicating the pixel values ​​of the luminance and two chrominance components associated with the entry, where m represents the bit depth of the video data. Compared with the multiple m-bit values ​​required for palette entries that are directly signaled, those palette entries obtained from the palette prediction values ​​only require a one-bit flag. Therefore, signaling some or all palette entries using palette prediction values ​​can significantly reduce the number of bits required to signal new palette table entries, thereby improving the overall codec efficiency of palette mode codecs.

[0074] In many instances, the palette prediction value of a block is determined based on the palette table used to encode and decode one or more previously encoded blocks. However, when encoding and decoding the first coding tree unit in a picture, slice, or tile, the palette table of the previously encoded block may not be available. Therefore, the entries of the previously used palette table cannot be used to generate the palette prediction value. In this case, a sequence of initial values ​​of palette prediction values ​​can be signaled in a sequence parameter set (SPS) and / or a picture parameter set (PPS), which initial value is the value used to generate the palette prediction value when the previously used palette table is not available. SPS generally refers to the syntax structure of syntax elements applied to a series of consecutive coded video pictures called a coded video sequence (CVS), as determined by the content of the syntax elements found in the PPS, which is referenced by the syntax elements found in each slice segment header. PPS generally refers to the syntax structure of syntax elements applied to one or more individual pictures within a CVS, as determined by the syntax elements found in each slice segment header. Therefore, the SPS is generally considered to be a higher-level syntax structure than the PPS, which means that the syntax elements included in the SPS generally change less frequently and apply to a larger portion of the video data than the syntax elements included in the PPS.

[0075] FIG. 5A to FIG. 5B is a block diagram illustrating an example of encoding and decoding video data using a palette table according to some embodiments of the present disclosure.

[0076] For palette (PLT) mode signal transmission, the palette mode is encoded as a prediction mode for a coding unit, that is, the prediction mode of a coding unit can be MODE_INTRA, MODE_INTER, MODE_IBC, and MODE_PLT. If the palette mode is used, the pixel values ​​in the CU are represented by a small group of representative colors. This group is called a palette. For pixels with values ​​close to the palette colors, the palette index is transmitted with a signal. For pixels with values ​​outside the palette, these pixels are represented by an escape symbol, and the quantized pixel value is directly transmitted with a signal. The syntax and related semantics of the palette mode in the current VVC draft specification are illustrated in Tables 1 and 2 below, respectively.

[0077] To decode the palette mode coded block, the decoder needs to decode the palette colors and indices from the bitstream. The palette colors are defined by the palette table and encoded by the palette table codec syntax (e.g., palette_predictor_run, num_signaled_palette_entries, new_palette_entries). The escape flag palette_escape_val_present_flag is signaled for each CU to indicate whether there is an escape symbol in the current CU. If there is an escape symbol, the palette table will add an entry and assign the last index to the escape mode. The palette indices of all pixels in the CU form a palette index map and are encoded by the palette index map codec syntax (e.g., num_palette_indices_minus1, palette_idx_idc, copy_above_for_final_run_flag, palette_transpose_flag, copy_above_palette_indices_flag, palette_run_prefix, palette_ru_fuffix). An example of a palette-mode coded CU is shown in Figure 5A , where the palette size is 4. The first 3 samples in the CU are reconstructed using palette entries 2, 0, and 3 respectively. The "x" samples in the CU represent escape symbols. The CU level flag palette_escape_val_present_flag indicates whether there are any escape symbols in the CU. If there are escape symbols, the palette size is increased by one and the last index is used to indicate the escape symbol. Therefore, in Figure 5A , index 4 is assigned to the escape symbol.

[0078] If the palette index (for example, Figure 5A If index 4) in corresponds to an escape symbol, additional overhead is signaled to indicate the corresponding color of the sample.

[0079] In some embodiments, on the encoder side, it is necessary to derive an appropriate palette for use with the CU. For palette derivation for lossy codecs, a modified k-means clustering algorithm is used. The first sample of the block is added to the palette. Then, for each subsequent sample in the block, the sum of absolute differences (SAD) between the sample and each current palette color is calculated. If the distortion of each component is less than the threshold of the palette entry corresponding to the minimum SAD, the sample is added to the cluster belonging to the palette entry. Otherwise, the sample is added as a new palette entry. When the number of samples mapped to a cluster exceeds the threshold, the centroid of the cluster will be updated and become the palette entry for the cluster.

[0080] In the next step, the clusters are sorted in descending order of usage. Then, the palette entry corresponding to each entry is updated. Typically, the centroid of the cluster is used as the palette entry. However, when the encoding and decoding cost of the palette entry is taken into account, a rate-distortion analysis is performed to analyze whether any entry from the palette prediction value is more suitable to replace the centroid for use as the updated palette entry. This process continues until all clusters have been processed or the maximum palette size is reached. Finally, if a cluster has only one sample point and the corresponding palette entry is not in the palette prediction value, the sample point is converted to an escape symbol. In addition, duplicate palette entries are deleted and their clusters are merged.

[0081] After palette derivation, each sample in the block is assigned the index of the nearest (in terms of SAD) palette entry. The samples are then assigned to either 'INDEX' or 'COPY_ABOVE' mode. For each sample where either 'INDEX' or 'COPY_ABOVE' mode is possible, the operation of each mode is determined. The cost of encoding and decoding that mode is then calculated. The mode with the lower cost is selected.

[0082] For codecs that use the palette table, a palette prediction is maintained. Both the maximum size of the palette and the maximum size of the palette prediction can be signaled in the SPS (or other codec levels, such as PPS, slice header, etc.). The palette prediction is initialized at the beginning of each slice where the palette prediction is reset to 0. For each entry in the palette prediction, a reuse flag is signaled to indicate whether it is part of the current palette. Figure 5B As shown, the reuse flag palette_predictor_run is sent. After that, the number of new palette entries is signaled using the syntax num_signaled_palette_entries using an exponential Golombcode of order 0. Finally, the component values ​​of the new palette entries new_palette_entries[] are signaled. After encoding and decoding the current CU, the palette prediction value is updated using the current palette, and the entries from the previous palette prediction value that are not reused in the current palette are added to the end of the new palette prediction value until the maximum allowed size is reached.

[0083] To encode and decode the palette index map, use horizontal or vertical traversal scan to encode and decode the index, such as Figure 5C The scan order is explicitly signaled in the bitstream using palette_transpose_flag.

[0084] The palette index is encoded and decoded using two main palette sample modes: 'INDEX' and 'COPY_ABOVE'. In 'INDEX' mode, the palette index is explicitly signaled. In 'COPY_ABOVE' mode, the palette index of the sample in the previous row is copied. For both 'INDEX' and 'COPY_ABOVE' modes, a running value is signaled that specifies the number of pixels encoded using the same mode. A flag is used to signal the mode except for the top row when horizontal scanning is used, or the first column when vertical scanning is used, or when the previous mode was 'COPY_ABOVE'.

[0085] In some embodiments, the encoding and decoding order of the index map is as follows: first, the number of index values ​​of the CU is signaled using the syntax num_palette_indices_minus1, followed by the actual index value of the entire CU using the syntax palette_idx_idc. The number of indexes and the index values ​​are both encoded and decoded in bypass mode. This groups together the binary bits of the bypass encoding and decoding related to the index. The palette mode (INDEX or COPY_ABOVE) and run are then signaled in an interleaved manner using the syntax copy_above_palette_indices_flag, palette_run_prefix, and palette_run_suffix. copy_above_palette_indices_flag is a context encoding and decoding flag (only one binary bit), the codeword of palette_run_prefix is ​​determined by the process described in Table 3 below, and the first 5 binary bits are context encoded and decoded. palette_run_suffix is ​​encoded and decoded as a bypass binary bit. Finally, the component escape values ​​corresponding to the escape samples of the entire CU are grouped together and encoded and decoded in bypass mode. After the index value is signaled, an additional syntax element copy_above_indices_for_final_run_flag is signaled. This syntax element combined with the number of indices eliminates the need to signal the run value corresponding to the last run in the block.

[0086] In the reference software of VVC (VTM), dual tree is enabled for I slices, which separates the coding unit partitions for luma and chroma components. Therefore, the palette is applied separately to luma (Y component) and chroma (Cb and Cr components). If dual tree is disabled, the palette will be applied jointly to Y, Cb, Cr components.

[0087] Table 1 Palette encoding and decoding syntax

[0088]

[0089]

[0090]

[0091]

[0092]

[0093]

[0094] Table 2 Palette encoding and decoding semantics

[0095]

[0096]

[0097]

[0098]

[0099]

[0100]

[0101] Table 3 Binary codewords and CABAC context selection for grammar palette_run_prefix

[0102]

[0103]

[0104]

[0105] At the 15th JVET meeting, a line-based CG was proposed (document number JVET-O0120, available at http: / / phenix.int-evry.fr / jvet / ) to simplify the buffer usage and syntax in the palette mode in VTM6.0. As the coefficient group (CG) used in transform coefficient encoding and decoding, the CU is divided into multiple row-based coefficient groups, each coefficient group consists of m samples, where for each CG, the index run, palette index value, and escape mode quantization color are sequentially encoded / parsed. Therefore, the pixels in the row-based CG can be reconstructed after parsing the syntax elements (for example, the index run, palette index value, and escape quantization color of the CG), which greatly reduces the buffer requirements in the palette mode in VTM6.0, where the syntax elements of the entire CU must be parsed (and stored) before reconstruction.

[0106] In this application, each CU in the palette mode is divided into multiple segments of m samples (m=8 in this test) based on the traversal scan mode, such as Figure 5D shown.

[0107] The coding order of palette run codec in each segment is as follows: for each pixel, a context codec bit run_copy_flag=0 is signaled, which indicates that the pixel is in the same mode as the previous pixel, that is, the previous scanned pixel and the current pixel both have run type COPY_ABOVE or the previous scanned pixel and the current pixel both have run type INDEX and the same index value. Otherwise, run_copy_flag=1 is signaled.

[0108] If the current pixel and the previous pixel are in different modes, a context codec binary bit copy_above_palette_indices_flag indicating the run type of the pixel (i.e., INDEX or COPY_ABOVE) is signaled. In this case, if the sample is in the first row (horizontal traversal scan) or the first column (vertical traversal scan), the decoder does not have to parse the run type because the INDEX mode is used by default. If the previously parsed run type is COPY_ABOVE, the decoder does not have to parse the run type either.

[0109] After palette run encoding and decoding for pixels in a segment, the index values ​​(of INDEX mode) and quantized escape colors are encoded as bypass bins and grouped separately from the encoding / parsing of context codec bins to improve throughput within each line-based CG. Since the index values ​​are now encoded / parsed after the run encoding and decoding, the encoder does not have to signal the number of index values ​​num_palette_indices_minus1 and the final run type copy_above_indices_for_final_run_flag. The syntax of the CG palette mode is shown in Table 4.

[0110] Table 4 Palette encoding and decoding syntax

[0111]

[0112]

[0113]

[0114]

[0115]

[0116] Figure 6 is a flowchart 600 illustrating an exemplary process by which a video decoder (eg, video decoder 30 ) implements techniques for decoding video data, according to some embodiments of the present disclosure.

[0117] For the palette mode in VVC, the palette mode can be applicable to a CU equal to or less than 64×64 pixels. In some embodiments, a minimum palette mode block size is proposed to reduce complexity, so that the palette mode is disabled for coding units whose size is less than the minimum palette mode block size. For example, it is proposed to disable the palette mode for all blocks whose size is less than a certain threshold (e.g., 16 samples). Because there are different chroma formats (e.g., 4:4:4, 4:2:2, 4:2:0) and different coding tree types (e.g., SINGLE_TREE, DUAL_TREE_LUMA, and DUAL_TREE_CHROMA), this threshold may vary. Note that "SINGLE_TREE" indicates that the luminance component and the chroma component of the image are divided in the same way, so that the two components share the same palette table and palette prediction value in the palette mode. In contrast, "DUAL_TREE" indicates that the luminance component and the chroma component of the image are divided separately, so that the two components have different palette tables and palette prediction values ​​in the palette mode. For example, for YUV 4:2:0 format with "DUAL_TREE" type, ie, different components are considered separately, the palette mode for chroma components of CUs with less than 16 samples should be disabled to reduce complexity. Table 5 below gives an example of the proposed syntax.

[0118] Table 5 — Palette mode enable flags for different coding tree types and chroma formats

[0119]

[0120] In Table 5, pred_mode_plt_flag specifies whether the palette mode is enabled (e.g., value 1) or disabled (e.g., value 0) for a coding unit. Parameters such as SubWidthC and SubHeightC are associated with the chroma format of the coding unit as follows:

[0121] Chroma Format SubWidthC SubHeightC monochrome 1 1 4:4:4 1 1 4:2:2 2 1 4:2:0 2 2

[0122] In monochrome sampling, there is only one sample array that is nominally considered to be the luma array. In 4:2:0 sampling, each of the two chroma arrays has half the height and half the width of the luma array. In 4:2:2 sampling, each of the two chroma arrays has the same height and half the width of the luma array. In 4:4:4 sampling, each of the two chroma arrays has the same height and width as the luma array.

[0123] In another embodiment, for the single tree case, the palette mode is disabled for small size blocks depending on the luma block size. In one example of the YUV 420 format, in the single tree case, the palette mode is disabled for CUs smaller than 16 pixels depending on the luma block size. In one specific example, the palette mode can be enabled for an 8×4 CU containing 8×4 luma samples and two 4×2 chroma samples, because the palette enabling depends on the size of the luma samples without considering the chroma size.

[0124] During decoding of the bitstream, the video decoder 30 first receives a plurality of syntax elements associated with a coding unit from the bitstream (610). The plurality of syntax elements indicate the size of the coding unit and the coding tree type of the coding unit. For example, the coding tree type of the coding unit may be one of SINGLE_TREE, DUAL_TREE_LUMA, or DUAL_TREE_CHROMA. The video decoder 30 then determines the minimum palette mode block size of the coding unit according to the coding tree type of the coding unit (620). For example, as shown in Table 5 above, when the coding tree type of the coding unit is SINGLE_TREE or DUAL_TREE_LUMA, the video decoder 30 sets the minimum palette mode block size to 16 samples. When the coding tree type of the coding unit is DUAL_TREE_CHROMA, the video decoder 30 first determines the chroma format of the coding unit and then sets the minimum palette mode block size according to the chroma format as shown in the table above. For example, when the chroma format is 4:4:4, the minimum palette mode block size is 16 samples; when the chroma format is 4:2:2, the minimum palette mode block size is 32 samples; and when the chroma format is 4:2:0, the minimum palette mode block size is 64 samples.

[0125] Based on determining that the size of the coding unit is greater than the minimum palette mode block size (630), video decoder 30 receives a palette mode enable flag associated with the coding unit from the bitstream (640), and then decodes the coding unit from the bitstream based on the palette mode enable flag (650). In some embodiments, when the palette mode enable flag indicates that the palette mode is enabled for the coding unit, video decoder 30 generates a palette table for the current unit from the bitstream (670), and then decodes the coding unit from the bitstream using the generated palette table (680), as described above in conjunction with FIG. 5A to FIG. 5D as described.

[0126] Figure 7 is a block diagram illustrating an exemplary context-adaptive binary arithmetic coding and decoding (CABAC) engine according to some embodiments of the present disclosure.

[0127] Context-Adaptive Binary Arithmetic Codec (CABAC) is a form of entropy coding used in many video codec standards, such as H.264 / MPEG-4 AVC, High Efficiency Video Codec (HEVC), and VVC. CABAC is based on arithmetic coding, with some innovations and changes to adapt it to the needs of video codec standards. For example, CABAC encodes and decodes binary symbols, thereby keeping complexity low and allowing probabilistic modeling of more common bits of any symbol. The probability model is adaptively selected based on the local context, allowing better modeling of probabilities because the codec modes are usually well correlated locally. Finally, CABAC uses multiplication-free range division by using quantized probability ranges and probability states.

[0128] CABAC has multiple probability modes for different contexts. CABAC first converts all non-binary symbols into binary. Then, for each binary digit (or bit), the codec selects a probability model to use and then uses information from nearby elements to optimize the probability estimate. Finally, arithmetic coding and decoding is applied to compress the data.

[0129] Context modeling provides an estimate of the conditional probability of the coded and decoded symbols. With a suitable context model, a given inter-symbol redundancy can be exploited by switching between different probability models, depending on the coded and decoded symbols near the current symbol to be encoded. Encoding and decoding a data symbol involves the following stages.

[0130] Binarization: CABAC uses binary arithmetic coding, which means that only binary decisions (1 or 0) are encoded. Prior to arithmetic coding, non-binary valued symbols (such as transform coefficients or motion vectors) are "binarized" or converted to binary codes. The process is similar to that of converting data symbols to variable length codes, but the binary codes are further encoded before transmission (by the arithmetic codec). The stage is repeated for each binary position (or "bit") of the binarized symbol.

[0131] Context Model Selection: A "context model" is a probability model for one or more bits of a binarized symbol. The model can be selected from a selection of available models based on statistics of recently encoded and decoded data symbols. The context model stores the probability of each bit being "1" or "0".

[0132] Arithmetic Coding: The arithmetic codec encodes each binary bit according to the chosen probability model. Note that each binary bit has only two sub-ranges (corresponding to "0" and "1").

[0133] Probability update: Update the selected context model based on the actual decoded value (e.g., if the binary bit value is "1", increase the frequency count of "1").

[0134] By decomposing each non-binary syntax element value into a sequence of bins, the further processing of each bin value in CABAC depends on the associated codec mode decision, which can be selected as normal mode or bypass mode. The latter is selected for bins that are assumed to be uniformly distributed, so the entire normal binary arithmetic coding (and decoding) process is simply bypassed. In normal coding mode, each bin value is encoded using a normal binary arithmetic codec engine, where the associated probability model is either determined by a fixed selection based on the type of syntax element and the bin position or bin index (binIdx) in the binary representation of the syntax element, or is adaptively selected from two or more probability models based on relevant side information (e.g., spatial neighbors, components, depth or size of the CU / PU / TU, or position within the TU). The choice of probability model is called context modeling. As an important design decision, the latter case is usually applied only to the most frequently observed bins, while other bins that are usually less frequently observed will be processed using a joint (usually zero-order) probability model. In this way, CABAC enables selective adaptive probability modeling at the sub-symbol level, thus providing an efficient tool for exploiting inter-symbol redundancy with significantly reduced overall modeling or learning costs. Note that for both the fixed and adaptive cases, in principle, the switch from one probability model to another can occur between any two consecutive conventionally coded bins. In summary, the design of the context model in CABAC reflects the goal of finding a good compromise between the conflicting goals of avoiding unnecessary modeling cost overhead and exploiting statistical dependencies to the greatest extent possible.

[0135] The parameters of the probability models in CABAC are adaptive, which means that the adaptation of the model probabilities to the statistical variations of the binary bit source is performed on a binary bit-by-bit basis in a backward adaptive and synchronized manner in the encoder and decoder; this process is called probability estimation. To this end, each probability model in CABAC can take one of 126 different states, where the associated model probability value p ranges in the interval [0:01875; 0:98125]. These two parameters of each probability model are stored in the context memory as 7-bit entries: 6 bits for each of the 63 probability states, representing the model probability pLPS of the least probable symbol (LPS); 1 bit represents nMPS, the value of the most probable symbol (MPS).

[0136] In one or more examples, the described functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted through a computer-readable medium as one or more instructions or codes and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media corresponding to tangible media such as data storage media or communication media including any media that facilitates, for example, transferring a computer program from one place to another according to a communication protocol. In this way, computer-readable media can generally correspond to (1) non-transient tangible computer-readable storage media or (2) communication media such as signals or carrier waves. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to obtain instructions, codes, and / or data structures for implementing the embodiments described in this application. A computer program product can include a computer-readable medium.

[0137] The terms used in the description of the embodiments herein are for the purpose of describing specific embodiments only and are not intended to limit the scope of the claims. As used in the description of the embodiments and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more items in the associated enumerated items. It will be further understood that when the terms "comprises" and / or "comprising" are used in this specification, they specify the presence of stated features, elements, and / or parts, but do not exclude the presence or addition of one or more other features, elements, parts, and / or groups thereof.

[0138] It should also be understood that although the terms first, second, etc. can be used to describe various elements in this article, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, without departing from the scope of the embodiment, the first electrode can be referred to as the second electrode, and similarly, the second electrode can be referred to as the first electrode. The first electrode and the second electrode are both electrodes, but the first electrode and the second electrode are not the same electrode.

[0139] The description of the present application has been presented for the purpose of illustration and description, and the description is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications, variations, and alternative embodiments will be apparent to those of ordinary skill in the art with the benefit of the teachings presented in the foregoing description and the associated drawings. The embodiments are selected and described in order to best explain the principles of the invention, the practical application, and to enable other persons skilled in the art to understand the various embodiments of the invention and to best utilize the basic principles and various embodiments with various modifications suitable for the intended specific use. Therefore, it should be understood that the scope of the claims should not be limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the appended claims.

Claims

1. A method for decoding video data, comprising: deriving a plurality of variables associated with a coding unit, wherein the plurality of variables indicate a luma coding block size and a coding tree type, wherein the coding unit is associated with a predefined partitioning method, wherein the predefined partitioning method comprises a quaternary partitioning, a horizontal ternary partitioning, a vertical ternary partitioning, a horizontal binary partitioning, or a vertical binary partitioning; Determining a palette mode block size threshold for the coding unit according to the coding tree type; Based at least on determining that the luma coding block size is greater than the palette mode block size threshold: receiving, from a bitstream, a palette mode enable flag associated with the coding unit; and The coding unit is decoded from the bitstream according to the palette mode enable flag.

2. The method according to claim 1, wherein: The decoding of the encoding unit from the bitstream according to the palette mode enable flag comprises: When the palette mode enable flag indicates that the palette mode is enabled for the encoding unit: generating a palette table for a current unit from the bitstream; and The coding unit is decoded from the bitstream using the generated palette table.

3. The method according to claim 1, wherein: The determining, according to the coding tree type, a palette mode block size threshold for the coding unit comprises: When the coding tree type is SINGLE_TREE or DUAL_TREE_LUMA: setting the palette mode block size threshold to 16; and When the coding tree type is DUAL_TREE_CHROMA: determining a chroma format for the coding unit; and The palette mode block size threshold is set according to the chroma format.

4. The method according to claim 3, wherein: When the chroma format is 4:4:4, the palette mode block size threshold is 16.

5. The method according to claim 3, wherein: When the chroma format is 4:2:2, the palette mode block size threshold is 32.

6. The method according to claim 3, wherein: When the chroma format is 4:2:0, the palette mode block size threshold is 64.

7. An electronic device comprising: one or more processing units; a memory coupled to the one or more processing units; as well as A plurality of programs stored in the memory, which, when executed by the one or more processing units, cause the electronic device to perform the method according to any one of claims 1 to 6.

8. A non-transitory computer-readable storage medium storing a plurality of programs for execution by an electronic device having one or more processing units, wherein: The plurality of programs, when executed by the electronic device, cause the one or more processing units to perform the method of any one of claims 1 to 6.

9. A computer program product comprising instructions for execution by a computing device having one or more processors, wherein the instructions, when executed by the one or more processors, cause the computing device to store a bit stream to be decoded by the method according to any one of claims 1 to 6.

10. A method for receiving a bit stream, wherein: The bit stream is decoded by the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Copy from previous rows for palette mode coding

    CN106464875A

  • Restriction on palette block size in video coding

    US20160234494A1