METHOD AND APPARATUS FOR VIDEO CODING USING PALETTE MODE - Patent application
Palette modes in video coding enhance encoding efficiency by using palette tables and CABAC to address the challenge of high-resolution video data volume, improving decoding quality and reducing complexity.
Patent Information
- Application Number
- JP2023145447
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-01-11
- Filing Date
- 2023-09-07
- Publication Date
- 2025-01-08
- Estimated Expiration
- 2041-01-11
AI Technical Summary
As video data transitions to higher resolutions like 4K×2K or 8K×4K, existing video coding methods face challenges in efficiently encoding and decoding this increased data volume while maintaining quality, particularly in block-based video coding systems.
Implementing palette modes for video coding, which involve dividing video frames into coding units, using palette tables to represent frequent pixel values, and employing context-adaptive binary arithmetic coding (CABAC) to enhance encoding efficiency.
Palette modes reduce the bit requirement for signaling palette entries, improving overall coding efficiency and reducing computational complexity in high-resolution video encoding and decoding processes.
Smart Images

Figure 0007610664000021 
Figure 0007610664000022 
Figure 0007610664000023
Abstract
Description
[Technical field]
[0001] Related Applications This application is a joint venture of the "VIDEO CODING USING This application claims priority to U.S. Provisional Application No. 62 / 959,913, entitled "VIDEO CODING USING PALETTE MODE," which is incorporated by reference in its entirety.
[0002] This application relates generally to coding and compression of video data, and more particularly to a method and system for video coding using palette mode. [Background technology]
[0003] Digital video is supported by a variety of electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smartphones, video teleconferencing devices, video streaming devices, etc. Such electronic devices transmit, receive, encode, decode, and / or store digital video data by implementing video compression and decompression standards such as MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC), and Versatile Video Coding (VVC) standards. Video compression generally involves performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove redundancy inherent in video data. For block-based video coding, a video frame is divided into one or more slices, with each slice having multiple video blocks, which may also be referred to as coding tree units (CTUs). Each CTU may contain one coding unit (CU) or may be recursively divided into smaller CUs until a predetermined minimum CU size is reached. Each CU (also named leaf CU) contains one or more transform units (TU) and also includes one or more prediction units (PU). Each CU may be coded in either intra mode, inter mode, or IBC mode. Video blocks in an intra-coded (I) slice in a video frame are coded using spatial prediction with respect to reference samples in neighboring blocks within the same video frame.Video blocks in an inter-coded (P or B) slice in a video frame may use spatial prediction with respect to reference samples in neighboring blocks in the same video frame, or may use temporal prediction with respect to reference samples in other previous and / or future reference video frames.
[0004] Spatial or temporal prediction based on previously coded reference blocks, e.g. neighboring blocks, results in a predicted block for the current video block being coded. The process of finding the reference block may be achieved by a block matching algorithm. Residual data representing pixel differences between the current block being coded and the predicted block is called a residual block or prediction error. Inter-coded blocks are coded according to motion vectors and residual blocks that point to reference blocks in a reference frame forming the predicted block. The process of determining a motion vector is commonly referred to as motion prediction. Intra-coded blocks are coded according to an intra prediction mode and a residual block. For further compression, the residual block may be transformed from the pixel domain into a vector representation, e.g. the frequency domain. The quantized transform coefficients may be converted to a transform domain to yield residual transform coefficients that are then quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, may be scanned to generate a one-dimensional vector of transform coefficients that are then entropy coded into a video bitstream to achieve even further compression.
[0005] The encoded video bitstream is then stored on a computer-readable recording medium (e.g., flash memory) that is accessed by another electronic device with digital video capabilities, or transmitted directly to the electronic device via wired or wireless connection. The electronic device then performs video decompression (the inverse process of video compression discussed above), e.g., by parsing the encoded video bitstream to obtain syntax elements from the bitstream, reconstructing digital video data from the encoded video bitstream into an 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 moves from High Definition to 4K×2K or 8K×4K, the amount of video data to be encoded / decoded increases exponentially, which is a continuous effort on how to encode / decode video data more efficiently while maintaining the image quality of the decoded video data. Summary of the Invention [Problem to be solved by the invention]
[0007] This application describes implementations related to encoding and decoding video data, and more particularly, describes systems and methods for encoding and decoding video using palette mode. [Means for solving the problem]
[0008] According to a first aspect of the present application, a method for decoding video data includes the steps of receiving from a bitstream a number of syntax elements associated with a coding unit, the number of syntax elements indicating a size and a coding tree type of the coding unit; determining a minimum palette mode block size for the coding unit in response to the coding tree type of the coding unit; in response to a determination that the size of the coding unit is greater than the minimum palette mode block size, receiving from the bitstream a palette mode enable flag associated with the coding unit; and decoding the coding unit from the bitstream in response to the palette mode enable flag.
[0009] According to a second aspect of the present application, an electronic device includes one or more processors, a memory, and a number of programs stored in the memory, which, when executed by the one or more processors, cause the electronic device to perform a method for decoding video data as described above.
[0010] According to a third aspect of the present application, a non-transitory computer-readable recording medium stores a number of programs for execution by an electronic device having one or more processors, the programs, when executed by the one or more processors, causing the electronic device to perform a method for decoding video data as described above.
[0011] The accompanying drawings, which are included to provide a further understanding of the implementations, are incorporated in and constitute a part of this specification, illustrate the described implementations, and together with the description, serve to explain basic principles. Like reference numerals refer to corresponding parts. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a block diagram illustrating an example video encoding and decoding system according to some implementations of the present disclosure. [Diagram 2]1 is a block diagram illustrating an example video encoder according to some implementations of the present disclosure. [Diagram 3] 1 is a block diagram illustrating an example video decoder according to some implementations of the present disclosure. [Figure 4A] A block diagram showing how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some implementations of this disclosure. [Figure 4B] A block diagram showing how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some implementations of this disclosure. [Figure 4C] A block diagram showing how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some implementations of this disclosure. [Figure 4D] A block diagram showing how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some implementations of this disclosure. [Figure 4E] A block diagram showing how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some implementations of this disclosure. [Figure 5A] A block diagram illustrating an example of using a palette table to encode video data in accordance with some implementations of the present disclosure. [Figure 5B] A block diagram illustrating an example of using a palette table to encode video data in accordance with some implementations of the present disclosure. [Figure 5C] A block diagram illustrating an example of using a palette table to encode video data in accordance with some implementations of the present disclosure. [Figure 5D] A block diagram illustrating an example of using a palette table to encode video data in accordance with some implementations of the present disclosure. [Figure 6]1 is a flow diagram illustrating an example process by which a video decoder performs techniques for decoding video data according to certain implementations of this disclosure. [Figure 7] FIG. 1 is a block diagram illustrating an example of a context-adaptive binary arithmetic coding (CABAC) engine in accordance with some implementations of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Reference will now be made in detail to specific implementations, 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 the understanding of the subject matter presented herein. However, it will be apparent to one skilled 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 skilled in the art that the subject matter presented herein may be practiced in many types of electronic devices with digital video capabilities.
[0014] 1 is a block diagram illustrating an example system 10 for concurrently encoding and decoding video blocks in accordance with some implementations of the present disclosure. As shown in FIG. 1, system 10 includes a source device 12 that generates and encodes video data that is subsequently decoded by a destination device 14. Source device 12 and destination device 14 may comprise any of a variety of electronic devices, including desktop or laptop computers, tablet computers, smartphones, set-top boxes, digital televisions, cameras, displays, digital media players, video game consoles, video streaming devices, and the like. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0015] In some implementations, the destination device 14 receives the encoded signal over link 16. The link 16 may receive encoded video data from the source device 12 to the destination device 14. The link 16 may comprise any type of communication medium or device capable of transferring encoded video data from the source device 12 to the destination device 14. In one example, the link 16 may comprise a communication medium for enabling the source device 12 to directly transmit encoded video data to the destination device 14 in real time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the destination device 14. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission paths. 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 routers, switches, base stations, or other equipment that helps facilitate communication from the source device 12 to the destination device 14.
[0016] In some other implementations, the encoded video data may be transmitted from output interface 22 to recording device 32. The encoded video data in recording device 32 may then be accessed by destination device 14 via input interface 28. Recording device 32 may include any of a variety of distributed or locally accessed data recording media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or other digital recording media suitable for storing encoded video data. In a further example, recording device 32 may represent a file server or another intermediate recording device that may hold the encoded video data generated by source device 12. Destination device 14 may access the stored video data by streaming or downloading from recording device 32. The file server may be any type of computer capable of storing encoded video data or transmitting the encoded video data to 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. Destination device 14 may access the encoded video data over any standard data connection, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL or cable modem), 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 recording device 32 may be a streaming transmission, a download transmission, or a combination of both.
[0017] 1, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include sources such as a video capture device, e.g., a video 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 the source video, or a combination of such sources. As an example, if video source 18 is a video camera in a security surveillance system, source device 12 and destination device 14 may form a camera phone or video phone. However, the implementations described in this application may be applicable to video coding in general and may be applied to wireless and / or wired applications.
[0018] 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 through output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored in recording 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.
[0019] Destination device 14 includes an input interface 28, a video decoder 30, and a 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 communicated over link 16 or provided by recording device 32 may include various syntax elements generated by video encoder 20 for use in decoding the video data by video decoder 30. The encoded video data, which may include such syntax elements, is transmitted over a communications medium and stored on a recording medium or a file server.
[0020] 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 comprise any of a variety of displays, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0021] Video encoder 20 and video decoder 30 may operate based on proprietary or industry standards, such as VVC, HEVC, MPEG-4 Part 10 AVC (Advanced Video Coding), or extensions of these standards. 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 video encoder 20 of source device 12 may be configured to encode video data in accordance with any of these current or future standards. Similarly, it is generally contemplated that video decoder 30 of destination device 14 may be configured to decode video data in accordance with any of these current or future standards.
[0022] Video encoder 20 and video decoder 30 may each be implemented using one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), or other integrated circuits. The video encoder 20 may be implemented as any of a variety of suitable encoding circuitry configurations, such as a field programmable gate array (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When implemented partially in software, the electronic device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding / decoding processes disclosed in this disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device.
[0023] 2 is a block diagram illustrating an example video encoder 20 according to some implementations described in this application. Video encoder 20 may perform intra-predictive and inter-predictive coding of video blocks within video frames. Intra-predictive coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-predictive coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence.
[0024] As shown in FIG. 2, the video encoder 20 includes a video data memory 40, a prediction processor 41, a decoded picture buffer (DPB), and a ) 64, adder 50, transform processor 52, quantizer 54, and entropy coder 56. Prediction processor 41 further includes motion estimator 42, motion compensation unit 44, partitioner 45, intra prediction processor 46, and intra block copy (BC) unit 48. In some implementations, video encoder 20 also includes inverse quantizer 58, inverse transform processor 60, and adder 62 for reconstructing video blocks. A deblocking filter (not shown) may be disposed between adder 62 and DPB 64 to filter block boundaries and remove blockiness from the reconstructed video. In addition to the deblocking filter, an in-loop filter (not shown) may also be used to filter the output of adder 62. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be divided among one or more fixed or programmable hardware units.
[0025] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from video source 18. DPB 64 is a buffer that records reference video data used to encode the video data by video encoder 20 (e.g., in an intra-predictive or inter-predictive encoding mode). Video data memory 40 and DPB 64 may be formed by any of a variety of storage devices. In various examples, video data memory 40 may be on-chip with other components of video encoder 20 or off-chip relative to those components.
[0026] As shown in FIG. 2, a partitioner 45 within the prediction processor 41 partitions the received video data into video blocks. This partitioning may include partitioning the video frame into slices, tiles, or other larger coding units (CUs) according to a predefined partitioning structure, such as a quadtree structure, associated with the video data. The video frame may be partitioned into a number of video blocks (or sets of video blocks referred to as tiles). The prediction processor 41 may select one of a number of possible predictive coding modes, such as one of a number of intra-predictive coding modes or one of a number of inter-predictive coding modes, for the current video block based on the error result (e.g., coding rate or distortion level). The prediction processor 41 may provide the resulting intra-predictive or inter-predictive coded block to an adder 50 to generate a residual block, and may provide the coded block to an adder 62 for later reconstructing for use as part of a reference frame. The prediction processor 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partitioning information, and other such syntax information, to the entropy coder 56.
[0027] To select an appropriate intra-prediction coding mode for a current video block, an intra-prediction unit 46 within prediction unit 41 may perform intra-prediction coding of the current video block relative to one or more neighboring blocks in the same frame as the current block being coded, resulting in spatial prediction. A motion estimation unit 42 and a motion compensation unit 44 within prediction unit 41 perform inter-prediction coding of the current video block relative to one or more predictive blocks in one or more reference frames, resulting in temporal prediction. Video encoder 20 may perform multiple coding passes, for example to select an appropriate coding mode for each block of video data.
[0028] In some implementations, motion estimation unit 42 determines the inter prediction mode for the current video frame by generating motion vectors that indicate the displacement of prediction units (PUs) of video blocks within the current video frame relative to prediction blocks within a reference video frame according to a predetermined pattern within a series of video frames. The motion estimation performed by motion estimation unit 42 generates motion vectors that estimate the motion of video blocks. A motion vector is a process of generating a motion vector. A motion vector may indicate, for example, the displacement of a PU of a video block within a current video frame or picture relative to a predictive block in a reference frame (or other coding unit) relative to a current block being coded in the current frame (or other coding unit). The predetermined pattern may designate the video frame as a P frame or a B frame in the sequence. Intra BC unit 48 may determine vectors, e.g., block vectors, for intra BC coding in a manner similar to the determination of motion vectors by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine the block vectors.
[0029] A prediction block is a block of a reference frame that is considered to closely correspond to the PU of the video block to be coded in terms of pixel difference. It is used to estimate the sum of absolute difference (SAD), sum of squared difference (SSD), and The fractional pixel locations may be determined by a factor of square difference (F p ), or other difference metric. In some implementations, video encoder 20 may calculate values for sub-integer pixel locations of the reference frame stored in DPB 64. For example, video encoder 20 may interpolate values for quarter-pixel locations, eighth-pixel locations, or other fractional pixel locations of the reference frame. Thus, motion estimator 42 may perform motion searches for whole pixel locations and fractional pixel locations to output motion vectors with fractional pixel precision.
[0030] The motion estimation unit 42 calculates a motion vector for a PU of a video block of an inter-predictive coded frame by comparing the position of the PU with the position of a predictive block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), where the first reference frame list or the second reference frame list respectively identifies one or more reference frames stored in the DPB 64. The motion estimation unit 42 sends the calculated motion vector to the motion compensation unit 44 and then to the entropy coding unit 56.
[0031] The motion compensation performed by motion compensation unit 44 may include fetching or generating a predictive block based on the motion vector determined by motion estimation unit 42. When motion compensation unit 44 receives a motion vector for a PU of a current video block, it locates the predictive block to which the motion vector points in one of the reference frame lists, retrieves the predictive block from DPB 64, and forwards the predictive block to summer 50. Summer 50 then forms a residual video block of pixel difference values by subtracting pixel values of the predictive block provided by motion compensation unit 44 from pixel values of the current video block to be coded. The pixel difference values forming the residual video block may include luma or chroma difference components, or both. Motion compensation unit 44 may also generate syntax elements related to the video blocks of the video frames for use by video decoder 30 in decoding the video blocks of the video frames. The syntax elements may include, for example, syntax elements defining a motion vector used to identify a predictive block, any flags indicating a prediction mode, or other syntax information described herein. Note that motion estimation unit 42 and motion compensation unit 44 may be largely integrated, but are shown separately for conceptual purposes.
[0032] In some implementations, intra BC unit 48 may generate vectors to capture predictive blocks in a manner similar to that described above with respect to motion estimation unit 42 and motion compensation unit 44, except that the predictive block is in the same frame as the current block being coded, and the vectors are referred to as block vectors, as opposed to motion vectors. In particular, intra BC unit 48 may determine to use an intra prediction mode to code the current block. In some examples, intra BC unit 48 may code the current block using different intra prediction modes, e.g., during separate coding passes, and determine the best intra prediction mode based on rate-distortion analysis. The intra-prediction modes may then be analyzed for performance using a rate-distortion analysis. Intra-BC unit 48 may then select an appropriate intra-prediction mode among the various intra-prediction modes tested to use in generating an intra-mode indicator. For example, intra-BC unit 48 may use a rate-distortion analysis to calculate rate-distortion values for the various intra-prediction modes tested and select the intra-prediction mode having the best rate-distortion characteristics among the tested modes as the appropriate intra-prediction mode to use. The rate-distortion analysis generally determines the bitrate (i.e., number of bits) used to generate the coded blocks, along with the amount of distortion (or error) between the coded blocks and the original uncoded blocks that are coded to generate the coded blocks. Intra-BC unit 48 may calculate the distortion-to-rate ratio for the various coded blocks to determine the intra-prediction mode that exhibits the best rate-distortion value for the block.
[0033] In other examples, the intra BC unit 48 may use, in whole or in part, the motion estimation unit 42 and the motion compensation unit 44 to perform such functions for intra BC prediction according to implementations described herein. In either case, for intra block copying, the predictive block may be a block that is considered to be a close equivalent to the block to be coded in terms of pixel differences, and may be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference measures. Identifying the predictive block may include computing values for sub-integer pixel positions.
[0034] Whether the predictive block is from the same frame via intra prediction or a different frame via inter prediction, video encoder 20 may form a residual video block by subtracting pixel values of the predictive block from pixel values of the current video block being encoded, forming pixel difference values. The pixel difference values that form the residual video block may include both luma and chroma difference components.
[0035] The intra prediction unit 46 may intra predict the current video block as an alternative to inter prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or intra block copy prediction performed by the intra BC unit 48, as described above. In particular, the intra prediction unit 46 may determine to use an intra prediction mode to encode the current block. To do so, the intra prediction unit 46 may encode the current block using various intra prediction modes, for example during separate encoding passes, and the intra prediction unit 46 (or a mode selection unit in some examples) may select an appropriate intra prediction mode to use from the tested intra prediction modes. The intra prediction unit 46 may provide information indicative of the selected intra prediction mode for the block to the entropy coder 56. The entropy coder 56 may encode the information indicative of the selected intra prediction mode in the bitstream.
[0036] After prediction processor 41 determines a predictive block for the current video block, either by inter prediction or intra prediction, adder 50 generates a residual video block by subtracting the predictive 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 processor 52. Transform processor 52 performs a discrete cosine transform (DCT) to generate a residual video block. The residual video data is transformed into residual transform coefficients using a transform such as the residual video transform (RfD) or a conceptually similar transform.
[0037] The transform processor 52 may send the resulting transform coefficients to a quantizer 54, which 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 varied by adjusting a quantization parameter. In some examples, the quantizer Entropy coding unit 54 may then perform a scan of the matrix containing the quantized transform coefficients, or entropy coding unit 56 may perform the scan.
[0038] Following quantization, the entropy coding unit 56 may use, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), or the like. The quantized transform coefficients are entropy coded into a video bitstream using context-adaptive binary arithmetic coding (CAIC), probability interval partitioning entropy coding (PIPE), or another entropy coding technique or technique. The coded bitstream may then be transmitted to video decoder 30 or recorded on storage device 32 for later transmission to or retrieval by video decoder 30. Entropy coding unit 56 may also entropy code motion vectors and other syntax elements for the current video frame being coded.
[0039] Inverse quantization unit 58 applies inverse quantization, and inverse transform unit 60 applies inverse transform to reconstruct the residual video block in the pixel domain to generate a reference block for predicting other video blocks. As mentioned 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.
[0040] Summer 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 as a prediction block to inter predict another video block in a subsequent video frame.
[0041] 3 is a block diagram illustrating an exemplary video decoder 30 according to some implementations 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 prediction processing unit 84, and an intra BC unit 85. The video decoder 30 may perform a decoding process that is generally inverse to the encoding process described for the video encoder 20 in connection with FIG. 2. For example, the motion compensation unit 82 may generate prediction data based on a motion vector received from the entropy decoding unit 80, while the intra prediction processing unit 84 may generate prediction data based on an intra prediction mode indicator received from the entropy decoding unit 80.
[0042] In some examples, units of video decoder 30 may be tasked with performing implementations of the present application. Also, in some examples, implementations of the present disclosure may be divided among one or more units of video decoder 30. For example, intra BC unit 85 may perform implementations of the present application alone or in combination with other units, such as motion compensation unit 82, intra prediction processing unit 84, and entropy decoding unit 80 of video decoder 30. In some examples, video decoder 30 may not include intra BC unit 85, and the functionality of intra BC unit 85 may be performed by other components of prediction processing unit 81, such as motion compensation unit 82.
[0043] Video data memory 79 may store video data, such as an encoded video bitstream, that is decoded by other components of video decoder 30. The video data stored in video data memory 79 may be obtained from recording device 32, from a local video source, such as a camera, by wired or wireless network communication of the video data, or by accessing a physical data storage medium, such as a flash drive or hard disk. Video data memory 79 may include a coded picture buffer (CPB) that stores coded video data from the coded video bitstream. A decoded picture buffer (DPB) 92 of video decoder 30 stores reference video data used to code video data by video decoder 30 (e.g., in an intra-predictive coding mode or an inter-predictive coding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous dynamic random access memory (SDRAM), magneto-resistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are depicted as two separate components of the video decoder 30 in FIG. 3. However, it will be apparent to one skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or may be off-chip relative to those components.
[0044] During the decoding process, video decoder 30 receives an encoded video bitstream representing video blocks of encoded video frames and associated syntax elements. Video decoder 30 may receive video frame-level and / or video block-level syntax elements. An entropy decoding unit 80 of video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements. Entropy decoding unit 80 then forwards the motion vectors and other syntax elements to a prediction processor 81.
[0045] When a video frame is coded as an intra-predictive coded (I) frame, or for intra-coded predictive blocks in other types of frames, the intra-prediction processing unit 84 of the prediction processing unit 81 may generate predictive data for video blocks of the current video frame based on a signaled intra-prediction mode and reference data from previously decoded blocks of the current frame.
[0046] When a video frame is coded as an inter-predictive (i.e., B or P) frame, motion compensation unit 82 of prediction unit 81 generates one or more predictive blocks for video blocks of the current video frame based on the motion vectors and other syntax elements received from entropy decoding unit 80. Each of the predictive blocks may be generated from a reference frame within one of the reference frame lists. Video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference frames stored in DPB 92.
[0047] In some examples, when a video block is encoded according to the intra BC modes described herein, intra BC unit 85 of prediction processor 81 generates a predictive block for the current video block based on the block vectors and other syntax elements received from entropy decoding unit 80. The predictive block may be within the same reconstructed region of the picture as the current video block defined by video encoder 20.
[0048] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for video blocks of a current video frame by analyzing the motion vectors and other syntax elements, and then use the prediction information to generate predictive blocks for the current video block to be decoded. For example, motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) used to encode video blocks of the video frame, an inter prediction frame type (e.g., B or P), configuration information for one or more of the reference frame lists for the frame, a motion vector for each inter predictive coded video block in the frame, an inter prediction state for each inter predictive coded video block of the frame, and other information for decoding video blocks in the current video frame.
[0049] Similarly, intra BC unit 85 may use some of the received syntax elements, such as flags, to determine that the current video block was predicted using an intra BC mode, configuration information of the video blocks of the frame that are within the reconstructed region and that should be stored in DPB 92, block vectors of each intra BC predicted video block of the frame, intra BC prediction states of each intra BC predicted video block of the frame, and other information for decoding video blocks in the current video frame.
[0050] Motion compensation unit 82 may also perform the interpolation using an interpolation filter such as that used to calculate sub-integer pixel interpolated values of the reference block during encoding of the video block by video encoder 20. In this case, motion compensation unit 82 may determine from the received syntax elements the interpolation filter used by video encoder 20 and generate the predictive block using the interpolation filter.
[0051] An inverse quantizer 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoder 80 using the same quantization parameters calculated by video encoder 20 to determine the degree of quantization for each video block in a video frame. An inverse transform processor 88 applies an inverse transform, such as an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct residual blocks in the pixel domain.
[0052] After the motion compensation unit 82 or the intra BC unit 85 generates a predictive block for the current video block based on the vectors and other syntax elements, the summer 90 reconstructs a decoded video block for the current video block by summing the residual block from the inverse transform processor 88 and the corresponding predictive block generated by the motion compensation unit 82 and the intra BC unit 85. An in-loop filter (not shown) may be disposed between the summer 90 and the DPB 92 to further process the decoded video block. The decoded video block in a given frame is then stored in the DPB 92, which stores reference frames used 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 to a display device, such as display device 34 of FIG. 1.
[0053] In a typical video coding 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 chrominance samples. SCr is a two-dimensional array of Cr chrominance samples. In other cases, a frame may be black and white and therefore include only one two-dimensional array of luma samples.
[0054] As shown in FIG. 4A, the video encoder 20 (more specifically, the splitter 45) generates a coded representation of a frame by first splitting the frame into a set of coding tree units (CTUs). A video frame may include an integer number of CTUs sequentially ordered in a raster scan order from left to right and top to bottom. Each CTU is a maximum logic coding unit, and the width and height of the CTUs are signaled by the video encoder 20 in a sequence parameter set such that all CTUs in a video sequence have the same size, which is one of 128×128, 64×64, 32×32, and 16×16. However, it should be noted that the present application is not necessarily limited to a particular size. As shown in FIG. 4B, each CTU may include one coding tree block (CTB) of luma samples, a corresponding coding tree block of two chrominance samples, and syntax elements used to code the samples of the coding tree block. The syntax elements describe the properties of various types of units of coding blocks of pixels and how a video sequence may be reconstructed at video decoder 30, including inter or intra prediction, intra prediction mode, motion vectors, and other parameters. For a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements used to code samples of the coding tree block. A coding tree block may be an N×N block of samples.
[0055] To achieve better performance, the video encoder 20 may recursively perform tree partitioning, such as binary-tree partitioning, ternary-tree partitioning, quad-tree partitioning, or a combination thereof, on the coding tree blocks of the CTU to partition the CTU into smaller coding units (CUs). As shown in FIG. 4C, a 64×64 CTU 400 is first partitioned into four smaller CUs, each with a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are partitioned into four CUs, each with a block size of 16×16. Two 16×16 CUs 430 and 440 are further partitioned into four CUs, each with a block size of 8×8. FIG. 4D illustrates a quadtree data structure showing the final result of the partitioning process of the CTU 400 as illustrated in FIG. 4C, where each leaf node of the quadtree corresponds to one CU of a respective size ranging from 32×32 to 8×8. Each CU may include a coding block (CB) of luma samples, two corresponding coding blocks of chroma samples of the same size frame, and syntax elements used to code the samples of the coding block, similar to the CTU illustrated in FIG. 4B. In a monochrome picture or a picture with three separate color planes, the CU may include a single coding block and syntax structures used to code the samples of the coding block. It should be noted that the quadtree partitioning illustrated in FIG. 4C and FIG. 4D is merely illustrative, and one CTU may be partitioned into CUs based on quadtree / ternary / binary tree partitioning to fit various local characteristics. In the composite tree structure, one CTU is divided by a quadtree structure, and the leaf CU of each quadtree can be further divided by a binary tree structure and a ternary tree structure. As shown in Fig. 4E, there are five division types, including 4-way, horizontal 2-way, vertical 2-way, horizontal 3-way, and vertical 3-way.
[0056] In some implementations, video encoder 20 may further divide a coding block of a CU into one or more M×N prediction blocks (PBs). A prediction block is a rectangular (square or non-square) block of samples on which a uniform (inter or intra) prediction is applied. A prediction unit (PU) of a CU may include a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and syntax elements used to predict the prediction blocks. In a monochrome picture or a picture with three separate color planes, a PU may include a single prediction block and syntax elements used to predict the prediction block. Video encoder 20 may generate predicted luminance, Cb and Cr blocks for luminance, and Cb and Cr prediction blocks, for each PU of a CU.
[0057] Video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks for a PU. If video encoder 20 uses intra prediction to generate the predictive blocks for a PU, video encoder 20 may generate the predictive blocks for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate the predictive blocks for a PU, video encoder 20 may generate the predictive blocks for the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0058] After generating the predictive luma block, the predictive Cb block, and the predictive Cr block for one or more PUs in the CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predictive luma block of the CU from the original luma coding block of the CU, such that each sample in the luma residual block of the CU indicates a difference between a luma sample in one of the predictive 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, such that each sample in the Cb residual block of the CU indicates a difference between a Cb sample in one of the predictive 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 a difference between a Cr sample in one of the predictive Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0059] Moreover, as shown in FIG. 4C, video encoder 20 uses 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 used to predict 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 syntax structures used to transform the samples of the transform block.
[0060] Video encoder 20 may apply one or more transforms to a luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficients may be scalar quantities. Video encoder 20 may apply one or more transforms to a Cb transform block of the TU to generate a Cb coefficient block for the TU. Video encoder 20 may apply one or more transforms to a Cr transform block of the TU to generate a Cr coefficient block for the TU.
[0061] 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 a process in which transform coefficients are quantized to somehow reduce the amount of data used to represent the transform coefficients, resulting in further compression. After quantizing the coefficient block, the video encoder 20 may entropy code syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform context-adaptive binary arithmetic coding (CABAC) on the syntax elements indicating the quantized transform coefficients. Finally, Video encoder 20 may output a bitstream including a series of bits forming a representation of the encoded frames and associated data, which may be stored in a recording device 32 or transmitted to destination device 14 .
[0062] After receiving the bitstream generated by video encoder 20, video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. Video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the reverse of the encoding process performed by video encoder 20. For example, video decoder 30 may perform an inverse transform on coefficient blocks associated with the TUs of the current CU to reconstruct residual blocks associated with the TUs of the current CU. Video decoder 30 may also reconstruct the coding blocks of the current CU by adding samples of the predictive blocks for the PUs of the current CU to samples of the transform blocks of the corresponding TUs of the current CU. Video decoder 30 may reconstruct the frame after reconstructing the coding blocks for each CU of the frame.
[0063] As mentioned above, video coding mainly uses two modes, intra-frame prediction (i.e., intra-prediction) and inter-frame prediction (i.e., inter-prediction), to achieve video compression. Palette-based coding is another coding scheme adopted by many video coding standards. Palette-based coding is particularly suitable for coding screen generated content, in which a video coder (e.g., video encoder 20 or video decoder 30) forms a palette table of colors representing 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 avoided colors.
[0064] Each entry in the palette table includes an index for a corresponding pixel value in the palette table. A palette index for a sample in a block may be coded to indicate the entry in the palette table used to predict or reconstruct the sample. This palette mode begins with the process of generating a palette predictor for the first block of a picture, slice, tile, or such grouping of video blocks. As described below, palette predictors for subsequent video blocks are generally generated by updating a previously used palette predictor. For illustrative purposes, it is assumed that the palette predictor is defined at the picture level. In other words, a picture may contain multiple coding blocks, each with its own palette table, but there is one palette predictor for the entire picture.
[0065] To reduce the number of bits required to signal palette entries in a video bitstream, a video decoder may utilize a palette predictor to determine new palette entries for a palette table used to reconstruct a video block. For example, the palette predictor may include palette entries from a previously used palette table, or may be initialized with a most recently used palette table by including all entries of the most recently used palette table. In some implementations, the palette predictor may include fewer than all entries from the most recently used palette table and then incorporate some entries from other previously used palette tables. The size of the palette predictor may be the same, larger, or smaller compared to the size of the palette tables used to encode different blocks. In one example, the palette predictor is implemented as a first-in-first-out (FIFO) table containing 64 palette entries.
[0066] To generate a palette table for a block of video data from the palette predictor, the video decoder may receive a one-bit flag for each input of the palette predictor from the encoded video bitstream. The one-bit flag may have a first value (e.g., a binary 1) indicating that the associated input of the palette predictor is included in the palette table or a second value (e.g., a binary 0) indicating that the associated input of the palette predictor is not included in the palette table. If the size of the palette predictor is larger than the palette table used for the block of video data, the video decoder may stop receiving further flags once the maximum size of the palette table is reached.
[0067] In some implementations, some entries of the palette table may be directly signaled in the coded video bitstream rather than being determined using a palette predictor. For such entries, the video decoder may receive three separate m-bit values from the coded video bitstream indicating pixel values for the luma component and two chroma components associated with the entry, where m represents the bit depth of the video data. Palette entries derived from the palette predictor require only a one-bit flag, whereas multiple m-bit values are required for directly signaled palette entries. Thus, signaling some or all of the palette entries using the palette predictor can significantly reduce the number of bits required to signal new palette table entries, thereby improving the overall coding efficiency of palette mode coding.
[0068] In many cases, a palette predictor for a block is determined based on a palette table used to code one or more previously coded blocks. However, when coding the first coding tree unit in a picture, slice, or tile, the palette table of the previously coded block may not be available. Thus, the palette predictor cannot be generated using entries in the previously used palette table. In such cases, a set of palette predictor initializers, values used to generate a palette predictor when the previously used palette table is not available, may be signaled in a sequence parameter set (SPS) and / or a picture parameter set (PPS). An SPS generally refers to a syntax structure of syntax elements that fits into a set of consecutive coded video pictures, called a coded video sequence (CVS), as determined by the content of syntax elements found in a PPS referenced by syntax elements found in each slice segment header. A PPS generally refers to a syntax structure of syntax elements that fits into one or more individual pictures within a CVS, as determined by the content of syntax elements found in each slice segment header. Thus, an SPS is generally considered a higher level syntax structure than a PPS, meaning that the syntax elements contained in an SPS generally change less frequently and fit a larger portion of the video data compared to the syntax elements contained in a PPS.
[0069] 5A-5B are block diagrams illustrating examples of using a palette table to encode video data in accordance with some implementations of the present disclosure.
[0070] For palette (PLT) mode signaling, the palette mode is coded as the prediction mode for a coding unit, i.e., the prediction modes for a coding unit can be MODE_INTRA, MODE_INTER, MODE_IBC, and MODE_PLT. When the palette mode is used, the pixel values of the CU are represented by a small set of representative colors. This set is called the palette. For pixels with values close to the palette colors, a palette index is signaled. Pixels with values outside the palette are signaled with the escape symbol. and the quantized pixel values are signaled directly. The syntax and associated semantics of the palette modes in the current VVC draft specification are shown in Tables 1 and 2 below, respectively.
[0071] To decode a block coded in palette mode, the decoder needs to decode the palette color and index from the bitstream. The palette color is defined by the palette table and coded by the palette table coding syntax (e.g., palette_predictor_run, num_signaled_palette_entries, new_palette_entries). For each CU, an escape flag palette_escape_val_present_flag is signaled to indicate whether there is an escape symbol in the current CU. If there is an escape symbol, the palette table is augmented by one more entry and the last index is assigned to the escape mode. The palette indices of all pixels in a CU form a palette index map and are coded by the palette index map coding syntax (e.g., num_palette_indices_minus1, palette_idx_idc, copy_above_indices_for_final_run_flag, palette_transpose_flag, copy_above_palette_indices_flag, palette_run_prefix, palette_run_suffix). Figure 5A shows an example of a CU coded in palette mode, with a palette size of 4. The first three samples in the CU use palette entries 2, 0, and 3 for reconstruction, respectively. The "x" samples in the CU represent escape symbols. A 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 augmented by one, and the last index is used to indicate the escape symbol. Thus, in Figure 5A, the escape symbol is assigned index 4.
[0072] If the palette index (eg, index 4 in FIG. 5A) corresponds to an escape symbol, then additional overhead is signaled to indicate the corresponding color of the sample.
[0073] In some embodiments, the encoder side needs to derive the appropriate palette to be used with the CU. A modified k-means clustering algorithm is used to derive the palette for lossy coding. The first sample of the block is added to the palette. Then, for each subsequent sample from the block, the sum of absolute differences (SAD) between the sample and each of the current palette colors is calculated. If the distortion of each of the components is less than the threshold of the palette entry corresponding to the smallest SAD, the sample is added to the cluster belonging to that palette entry. Otherwise, the sample is added as a new palette entry. If the number of samples mapped to a cluster exceeds the threshold, the centroid of that cluster is updated to become the palette entry of that cluster.
[0074] In the next step, the clusters are sorted in descending order of usage. The palette entry corresponding to each entry is then updated. Usually, the cluster centroid is used as the palette entry. However, a rate-distortion analysis is performed to analyze if there is any entry from the palette predictor that is more suitable to be used as the updated palette entry instead of the centroid, taking into account the cost of coding the palette entry. This process continues until all the clusters have been processed or the maximum palette size is reached. Finally, if a cluster has only a single sample and there is no corresponding palette entry in the palette predictor, the sample is converted to an escape symbol. In addition, duplicate palette entries are removed and their clusters are combined.
[0075] After palette derivation, each sample in the block is assigned the index of the closest palette entry (in the SAD). The sample is then assigned to either "INDEX" or "COPY_ABOVE" mode. For each sample that can be in either "INDEX" or "COPY_ABOVE" mode, the implementation of each mode is determined. The cost of encoding the modes is then calculated. The mode with the lower cost is selected.
[0076] A palette predictor is maintained for encoding the palette table. Both the maximum size of the palette and the maximum size of the palette predictor can be signaled in the SPS (or other encoding levels such as PPS, slice header, etc.). The palette predictor is initialized at the start of each slice, where the palette predictor is reset to 0. For each entry of the palette predictor, a reuse flag is signaled to indicate whether it is part of the current palette or not. As shown in FIG. 5B, a reuse flag, palette_predictor_run, is sent. After this, the number of new palette entries is signaled using an exponential-Golomb code of order 0 to the syntax num_signaled_palette_entries. Finally, the component values for the new palette entries, new_palette_entries[], are signaled. After encoding the current CU, the palette predictor is updated using the current palette, and at the end of the new palette predictor, entries from the previous palette predictor that are not reused in the current palette are added until the maximum possible size is reached.
[0077] To encode a palette index map, the indices are encoded using either horizontal or vertical scanning, as shown in Figure 5C. The scanning order is explicitly signaled in the bitstream using the palette_transpose_flag.
[0078] The palette index is coded 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 row above is copied. For both "INDEX" and "COPY_ABOVE" modes, a run value is signaled that specifies the number of pixels to be coded using the same mode. The mode is signaled using a flag, but not the top row when horizontal scanning is used, or the first column when vertical scanning is used or the previous mode was "COPY_ABOVE".
[0079] In some embodiments, the coding order for 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. Both the number of indices and the index value are coded in bypass mode, which groups the bypass coding bins associated with the index. Then, the palette mode (INDEX or COPY_ABOVE) and run are 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 coding flag (only one bin), the codeword of palette_run_prefix is determined by the process described in Table 3 below, and the first five bins are context coded. palette_run_suffix is a bypass coding flag (only one bin), the codeword of palette_run_prefix is determined by the process described in Table 3 below, and the first five bins are context coded. palette_run_suffix is a bypass coding flag (only one bin), the codeword of palette_run_prefix is determined by the process described in Table 3 below, and the first five bins are context coded. bins. Finally, the component escape values corresponding to the escape samples for the entire CU are grouped and coded in bypass mode. After signaling the index values, an additional syntax element copy_above_indices_for_final_run_flag is signaled. This syntax element eliminates the need to signal the run value corresponding to the last run in the block along with the number of indices.
[0080] In the VVC (VTM) reference software, the dual tree is enabled for I slices to separate the coding unit split for luma and chroma components. As a result, the palette is applied separately to luma (Y component) and chroma (Cb and Cr components). When the dual tree is disabled, the palette is applied jointly to the Y, Cb, and Cr components.
[0081] [Table 1-1] [Table 1-2] [Table 1-3] [Table 1-4] [Table 1-5] [Table 1-6]
[0082] [Table 2-1] [Table 2-2] [Table 2-3] [Table 2-4] [Table 2-5]
[0083] [Table 3-1] [Table 3-2]
[0084] In the 15th JVET conference, line-based CGs are proposed to simplify buffer usage and syntax in palette mode of VTM6.0 (document number JVET-O0120, which can be accessed at http: / / phenix.int-evry.fr / jvet / ). CUs are divided into multiple line-based coefficient groups of m samples each, like coefficient groups (CGs) used in encoding transform coefficients, where index runs, palette index values, and quantized colors for escape mode are coded / parsed sequentially for each CG. As a result, pixels in line-based CGs can be reconstructed after parsing syntax elements, e.g. index runs, palette index values, and escape quantized colors for CGs, which allows VTM6.0 to parse all CGs before reconstruction. The buffer requirements in palette mode, where syntax elements for a CU need to be parsed (and stored), are greatly reduced.
[0085] In this application, each CU in palette mode is divided into multiple segments of m samples (m=8 in this test) based on the horizontal scan mode, as shown in FIG. 5D.
[0086] In each segment, the coding order for palette run coding is as follows: For each pixel, one context coding bin run_copy_flag=0 is signaled indicating that the pixel is of the same mode as the previous pixel, i.e., the previous scanned pixel and the current pixel are both of run type COPY_ABOVE, or of run type INDEX with the same index value. Otherwise, run_copy_flag=1 is signaled.
[0087] If the current pixel and the previous pixel are in different modes, one context coding bin copy_above_palette indices_flag is signaled to indicate the execution type of the pixel, i.e. INDEX or COPY_ABOVE. In this case, since INDEX mode is used by default, the decoder does not need to parse the execution type whether the sample is in the first row (horizontal scan) or the first column (vertical scan). The decoder also does not need to parse the execution type whether the previously parsed execution type was COPY_ABOVE.
[0088] After palette run coding of pixels in one segment, index values (in INDEX mode) and quantized escape colors are coded as bypass bins and grouped separately from the coding / parsing of context coding bins to improve internal performance of each line-based CG. After coding run, the encoder does not need to signal the number of index values num_palette_indices_minus1 and the final run type copy_above_indices_for_final_run_flag, since the index values are coded / parsed at this time. The syntax of CG palette mode is shown in Table 4.
[0089] [Table 4-1] [Table 4-2] [Table 4-3] [Table 4-4] [Table 4-5]
[0090] FIG. 6 is a flow diagram 600 illustrating an example process by which a video decoder (eg, video decoder 30) performs techniques for decoding video data according to certain implementations of this disclosure.
[0091] For the VVC palette mode, the palette mode may fit into CUs of 64x64 pixels or smaller. In some embodiments, a minimum palette mode block size is proposed to disable palette mode for coding units of size smaller than the minimum palette mode block size to reduce complexity. For example, it is proposed to disable palette mode for all blocks of size smaller than a certain threshold, e.g., 16 samples. This threshold may vary since there are various chrominance formats (e.g., 4:4:4, 4:2:2, 4:2:0) and various coding tree types (e.g., SINGLE_TREE, DUAL_TREE_LUMA, and DUAL_TREE_CHROMA). Note that "SINGLE_TREE" indicates that the luma and chroma components of an image are split similarly such that the two components share the same palette table and palette predictor under the palette mode. In contrast, "DUAL_TREE" indicates that the luma and chroma components of an image are split separately such that the two components get separate palette tables and palette predictors under the palette mode. For example, for a YUV 4:2:0 format with a "DUAL_TREE" type, where different components are taken into account separately, the palette mode of chrominance components of CUs with less than 16 samples may be disabled to reduce complexity. The following Table 5 shows an example of the proposed syntax.
[0092] [Table 5]
[0093] In Table 5, pred_mode_plt_flag specifies whether palette mode is enabled (e.g., a value of 1) or disabled (e.g., a value of 0) for the coding unit. Parameters such as SubWidthC and SubHeightC are associated with the chroma format of the coding unit as follows: [Table 6]
[0094] In monochrome sampling there is only one sample array, nominally considered 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 relative to the luma array. In 4:4:4 sampling, each of the two chroma arrays has the same height and the same width as the luma array.
[0095] In another embodiment, in the case of a single tree, the palette mode is In one example for the YUV 420 format, palette mode for CUs smaller than 16 pixels is disabled in the single tree case depending on the luma block size. In one specific example, palette enablement is conditional on the luma sample size and ignores the chroma sample size, so palette mode may be enabled for an 8×4 CU containing an 8×4 luma sample and two 4×2 chroma samples.
[0096] During bitstream decoding, video decoder 30 first receives from the bitstream a number of syntax elements associated with a coding unit (610). The number of syntax elements indicate a size and a 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. Video decoder 30 then determines a minimum palette mode block size for the coding unit depending on 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, 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, video decoder 30 first determines a chroma format for the coding unit and then sets the minimum palette mode block size depending on 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.
[0097] In response to determining that the size of the coding unit is larger 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 in response to the palette mode enable flag (650). In some embodiments, when the palette mode enable flag indicates that 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 connection with Figures 5A-5D.
[0098] FIG. 7 is a block diagram illustrating an example context-adaptive binary arithmetic coding (CABAC) engine in accordance with some implementations of the present disclosure.
[0099] Context-adaptive binary arithmetic coding (CABAC) is a form of entropy coding used in many video coding standards, e.g., H.264 / MPEG-4 AVC, High Efficiency Video Coding (HEVC), and VVC. CABAC is based on arithmetic coding, with some innovations and modifications to fit the requirements of video coding standards. For example, CABAC codes binary symbols, keeping the complexity low and allowing probability modeling for the more frequently used bits of every symbol. The probability model is adaptively selected based on the local context, allowing better modeling of probabilities since coding modes are usually well correlated locally. Finally, CABAC uses multiplication-free range partitioning by using quantized probability ranges and probability states.
[0100] CABAC has multiple probability models for different contexts. First, all non-binary symbols are converted to binary. Then, for each bin (also called bit), the encoder selects which probability model to use and then optimizes the probability estimate using information from nearby elements. Finally, arithmetic coding is applied to compress the data.
[0101] Context modeling results in the estimation of the conditional probability of the coding symbols. With the aid of a suitable context model, a given inter-symbol redundancy can be exploited by switching between different probability models depending on the already coded symbols in the neighborhood of the current symbol for coding. The step of coding a data symbol includes the following stages:
[0102] Binarization: CABAC uses binary arithmetic coding, meaning that only binary decisions (1 or 0) are coded. Non-binary symbols (e.g., transform coefficients or motion vectors) are "binarized" or converted into binary codes prior to arithmetic coding. This process is similar to converting data symbols into variable-length codes, but the binary codes are further coded (by an arithmetic coder) before transmission. The stages are repeated for each bin (or "bit") of the binarized symbols.
[0103] Context Model Selection: A "context model" is a probability model for one or more bins of a binarized symbol. This model may be selected from available models based on statistics of recently coded data symbols. A context model stores the probability that each bin is a "1" or a "0".
[0104] Arithmetic coding: The arithmetic coder codes each bin according to a selected probability model. Note that for each bin, there are exactly two subranges (corresponding to "0" and "1").
[0105] Probability update: The selected context model is updated based on the actual encoded value (e.g., if the bin value is "1", the frequency count of "1" is increased).
[0106] By decomposing the value of each non-binary syntax element into a set of bins, the further processing of each bin value in CABAC can be selected to normal mode or bypass mode depending on the associated coding mode decision. Bins selected for bypass mode are assumed to have a uniform distribution, and consequently, all normal binary arithmetic coding (and decoding) processes are simply bypassed. In normal coding mode, each bin value is coded by using a normal binary arithmetic coding engine, and the associated probability model is determined by a fixed selection based on the type of syntax element and the bin position, i.e., bin index (binIdx), of the binarized representation of the syntax element, or is adaptively selected from two or more probability models depending on the associated side information (e.g., spatial neighborhood, component, depth or size of CU / PU / TU, or position inside TU). The selection of the probability model is called context modeling. As an important design decision, the latter is generally applied only to the most frequently observed bins, and other bins, which are usually less frequently observed, are processed using joints, generally using a zero-order probability model. In this way, CABAC allows selective adaptive probability modeling at the sub-symbol level, thus providing an efficient means for exploiting inter-symbol redundancy with significantly reduced overall modeling or learning costs. Note that for both fixed and adaptive selection, in principle, switching from one probability model to another can occur between any two consecutive normally coded bins. In general, in CABAC, the design of the context model strikes a good compromise between the conflicting goals of preventing unnecessary modeling cost overhead and exploiting statistical dependencies to a significant extent. Reflect the goal of
[0107] The parameters of the probability models in CABAC are adaptive, which means that the adaptation of the model probabilities to the statistical fluctuations of the bin's source is performed synchronously, backward-adaptively, for each bin, at both the encoder and the decoder, a process called probability estimation. To that end, each probability model in CABAC can adopt one of 126 separate states, with the associated model probability value p ranging from [0:01875;0:98125]. The two parameters of each probability model are stored as 7-bit entries in the context memory, 6 bits for each of the 63 probability states representing the model probability pLPS of the least probable symbol (LPS), and 1 bit for the value nMPS of the most probable symbol (MPS).
[0108] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates transfer of a computer program from one location to another, for example according to a communication protocol. As such, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that may be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures to implement the implementations described herein. A computer program product may include a computer-readable medium.
[0109] The terminology used in the description of the implementations herein is for the purpose of describing only the particular implementations and is not intended to limit the scope of the claims. As used in the description of the implementations and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise. The term "and / or" as used herein will also be understood to refer to and include any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms "comprise" and / or "comprising" as used herein specify the presence of stated features, elements, and / or components, but do not exclude the presence or addition of one or more other features, elements, components, and / or groups thereof.
[0110] To describe various elements, terms such as first, second, etc. may be used in this specification, but it will be understood that these elements should not be limited by these terms. These terms are merely used to distinguish one element from another. For example, a first electrode may be referred to as a second electrode, and similarly, a second electrode may be referred to as a first electrode, without departing from the scope of the implementation. The first electrode and the second electrode are both electrodes, but are not the same electrode.
[0111] The description in this application has been presented for purposes of illustration and description and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications, variations, and alternative implementations will be apparent to one skilled in the art having the benefit of the teachings presented in the foregoing description and the associated drawings. The embodiments are provided to best explain the principles and practical applications of the invention, to enable others skilled in the art to understand the invention in terms of various implementations, and to provide a comprehensive understanding of the basic principles and various modifications as may be appropriate for the particular use intended. Various implementations with associated features have been selected and described in order to best utilize them, and it is therefore to be understood that the claims are not limited to the specific examples and modifications of the disclosed implementations, but that other implementations are intended to be included within the scope of the appended claims.
Claims
1. 1. A method for encoding video data, comprising the steps of: deriving a number of variables associated with a coding unit, the number of variables indicating a size and a coding tree type of a luma coding block, the coding unit being associated with a predefined partitioning method, the predefined partitioning method comprising: 4-partitioning, 3-partitioning horizontally, 3-partitioning vertically, 2-partitioning horizontally or 2-partitioning vertically; determining a palette mode block size threshold for the coding unit in response to the coding tree type; in response to determining that the size of at least the luma coding block is greater than the palette mode block size threshold, determining a palette mode enable flag associated with the coding unit; encoding the coding unit in response to the palette mode enable flag; Including, determining a palette mode block size threshold for the coding unit in response to the coding tree type, When the coding tree type is SINGLE_TREE or DUAL_TREE_LUMA, Setting the palette mode block size threshold to 16; When the coding tree type is DUAL_TREE_CHROMA, Setting the palette mode block size threshold as a function of a chrominance format.
2. 2. The method of claim 1 , The step of encoding the coding unit in response to the palette mode enable flag comprises: when the palette mode enable flag indicates that the palette mode is enabled for the coding unit; determining a palette table for the coding unit; encoding the coding unit using the determined palette table. A method comprising:
3. 3. The method of claim 2, further comprising the step of generating an escape flag indicating whether an escape coded sample is within the coding unit.
4. The method of claim 1 , wherein the palette mode block size threshold is 16 when the chrominance format is 4:4:
4.
5. The method of claim 1 , wherein the palette mode block size threshold is 32 when the chrominance format is 4:2:
2.
6. The method of claim 1 , wherein the palette mode block size threshold is 64 when the chrominance format is 4:2:
0.
7. 1. An electronic device comprising: one or more processing units; a memory coupled to the one or more processing units; A plurality of programs stored in the memory; Equipped with An electronic device, wherein the plurality of programs, when executed by the one or more processors, cause the electronic device to perform the method of any one of claims 1 to 6.
8. A non-transitory computer-readable recording medium storing a plurality of programs for execution by an electronic device having one or more processing units, the plurality of programs, when executed by the one or more processing units, causing the electronic device to perform a method according to any one of claims 1 to 6.
9. 7. A computer program comprising instructions for execution by a computing device having one or more processors, the instructions, when executed by the one or more processors, causing the computing device to perform a method according to any one of claims 1 to 6.
10. A method for transmitting a bitstream generated by a video encoder, the video encoder comprising one or more processing units configured to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Restriction on palette block size in video coding
US20160234494A1