Method and apparatus for coding residuals and coefficients - Patents.com
Improved residual and coefficient coding methods enhance the efficiency of decoding high-definition and ultra-high-definition video data, addressing the challenges of increased data volume in existing technologies.
Patent Information
- Application Number
- JP2024112389
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-10-07
- Filing Date
- 2024-07-12
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2040-09-29
AI Technical Summary
Existing video coding technologies face challenges in efficiently encoding and decoding high-definition and ultra-high-definition video data while maintaining image quality, as the amount of data to be processed increases exponentially.
Implementing methods and systems for improved residual and coefficient coding, including decoding video data by receiving syntax elements, determining Rice parameters, and converting codewords into parameters and symbolic values to enhance decoding efficiency.
Enhances the decoding efficiency of high-definition and ultra-high-definition video data, maintaining image quality by optimizing residual and coefficient coding processes.
Smart Images

Figure 0007761715000002 
Figure 0007761715000003 
Figure 0007761715000004
Abstract
Description
[Technical Field]
[0001] (Related Applications) This application claims priority to U.S. Provisional Patent Application No. 62 / 909,079, filed October 1, 2019, entitled "Residual and Coefficients Coding for Video Coding," U.S. Provisional Patent Application No. 62 / 911,260, filed October 5, 2019, entitled "Residual and Coefficients Coding for Video Coding," and U.S. Provisional Patent Application No. 62 / 911,930, filed October 7, 2019, entitled "Residual and Coefficients Coding for Video Coding," all of which are incorporated by reference in their entireties.
[0002] (Technical field) This application relates generally to encoding and compressing video data, and more particularly to methods and systems for improving residual and coefficient coding for video coding. [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, and video streaming devices. 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). 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 (TUs) and also includes one or more prediction units (PUs). Each CU may be coded in either intra mode, inter mode, or IBC mode. Video blocks within 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 within an inter-coded (P or B) slice in a video frame may use spatial prediction relative to reference samples in neighboring blocks within the same video frame, or may use temporal prediction relative to reference samples in other previous and / or future reference video frames.
[0004] Spatial or temporal prediction based on previously coded reference blocks, such as 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 that point to reference blocks in reference frames and residual blocks that form the predicted block. The process of determining a motion vector is generally called motion prediction. Intra-coded blocks are coded according to intra-prediction modes and residual blocks. For further compression, the residual blocks may be transformed from the pixel domain to a transform domain, such as the frequency domain, to yield residual transform coefficients, which 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, which 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 storage 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 connections. The electronic device then performs video decompression (the inverse process of the video compression discussed above) by, for example, parsing the encoded video bitstream to obtain syntax elements from the bitstream, reconstructing the digital video data from the encoded video bitstream into 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 moves from high definition to 4Kx2K or 8Kx4K, the amount of video data to be encoded / decoded increases exponentially, which means there is a constant effort 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, to methods and systems for improving residual and coefficient coding for video coding. [Means for solving the problem]
[0008] According to a first aspect of the present application, a method for decoding video data includes receiving, from a bitstream, one or more syntax elements and video data corresponding to a coding unit; determining Rice parameters according to the one or more syntax elements; decoding, from the video data, a first codeword and a second codeword for a pixel in the coding unit; converting the first codeword into a parameter for the pixel according to a predetermined mapping relationship generated using the determined Rice parameters; converting the second codeword into a symbolic value of the parameter; and determining a quantified pixel value for the pixel based on the parameter and the symbolic value.
[0009] According to a second aspect of the present application, an electronic device includes one or more processing units, a memory, and 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 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 plurality of programs for execution by an electronic device having one or more processing units, the programs, when executed by the one or more processing units, causing the electronic device to perform the method for decoding video data as described above.
[0011] The accompanying drawings, which are included to provide a further understanding of the embodiments, are incorporated in and constitute a part of this specification, illustrate the described embodiments, and together with the description, serve to explain the underlying principles, with like reference numerals referring to corresponding parts. [Brief explanation of the drawings]
[0012] [Figure 1] FIG. 1 is a block diagram illustrating an example video encoding and decoding system according to some embodiments of the present disclosure. [Figure 2]1 is a block diagram illustrating an example video encoder according to some embodiments of this disclosure. [Figure 3] 1 is a block diagram illustrating an example video decoder according to some embodiments of the present disclosure. [Figure 4A] FIG. 2 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of this disclosure. [Figure 4B] FIG. 2 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of this disclosure. [Figure 4C] FIG. 2 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of this disclosure. [Figure 4D] FIG. 2 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of this disclosure. [Figure 4E] FIG. 2 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of this disclosure. [Figure 5A] FIG. 1 is a block diagram illustrating an example of an efficient encoding transformation using context coding and bypass coding, according to some implementations of the present disclosure. [Figure 5B] FIG. 1 is a block diagram illustrating an example of an efficient encoding transformation using context coding and bypass coding, according to some implementations of the present disclosure. [Figure 6] FIG. 1 is a block diagram illustrating an example process of dependent scalar quantization according to some implementations of the present disclosure. [Figure 7] FIG. 2 is a block diagram illustrating an example state machine for switching between two different scalar quantizers, in accordance with some implementations of the present disclosure. [Figure 8]1 is a flow diagram illustrating an example process by which a video decoder performs residual and coefficient coding for a coding block, according to some implementations of this disclosure. [Figure 9] FIG. 1 is a block diagram illustrating an example of a context-adaptive binary arithmetic coding (CABAC) engine, according to some implementations of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0013] 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 an understanding of the subject matter presented herein. However, it will be apparent to those 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 those skilled in the art that the subject matter presented herein may be implemented in many types of electronic devices with digital video capabilities.
[0014] Figure 1 is a block diagram illustrating an exemplary system 10 for concurrently encoding and decoding video blocks, in accordance with some embodiments of the present disclosure. As shown in Figure 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, etc. In some embodiments, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0015] In some embodiments, destination device 14 may receive the encoded video data to be decoded over link 16. Link 16 may comprise any type of communications medium or device capable of transferring encoded video data from source device 12 to destination device 14. In one example, link 16 may comprise a communications medium that enables source device 12 to transmit encoded video data directly to destination device 14 in real time. The encoded video data may be modulated according to a communications standard, such as a wireless communications protocol, and transmitted to destination device 14. The communications medium may comprise any wireless or wired communications medium, such as the radio frequency (RF) spectrum or one or more physical transmission paths. The communications 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 communications medium may include routers, switches, base stations, or other equipment that helps facilitate communication from source device 12 to destination device 14.
[0016] In some other embodiments, 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 storage media, such as a hard drive, Blu-ray Disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or other digital storage media suitable for storing encoded video data. In a further example, recording device 32 may represent a file server or another intermediate storage 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 it 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., a DSL or cable modem), or a combination of both, suitable for accessing 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 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 embodiments described herein may be applicable to video coding generally 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 file server.
[0020] In some embodiments, 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 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.
[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 as any of a variety of suitable encoding circuitry, 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 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. Video encoder 20 and video decoder 30 may each 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 exemplary video encoder 20 according to some embodiments described herein. 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, video encoder 20 includes a video data memory 40, a prediction processor 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processor 52, a quantizer 54, and an entropy encoder 56. Prediction processor 41 further includes a motion estimator 42, a motion compensation processor 44, a segmenter 45, an intra-prediction processor 46, and an intra-block copy (BC) unit 48. In some embodiments, video encoder 20 also includes an inverse quantizer 58, an inverse transform processor 60, and an 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 block artifacts 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 by video encoder 20 to encode video data (e.g., in an intra-predictive coding mode or an inter-predictive coding 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 may be off-chip relative to those components.
[0026] As shown in FIG. 2 , a partitioning unit 45 within the prediction processor 41 partitions the received video data into video blocks. This partitioning may include dividing the video frame into slices, tiles, or other larger coding units (CUs) according to a predetermined partitioning structure, such as a quadtree structure, associated with the video data. The video frame may be partitioned into multiple video blocks (or sets of video blocks called tiles). The prediction processor 41 may select one of multiple possible predictive coding modes, such as one of multiple intra-predictive coding modes or one of multiple inter-predictive coding modes, for the current video block based on error results (e.g., coding rate or distortion level). The prediction processor 41 may provide the resulting intra-predictive or inter-predictive coded block to adder 50 to generate a residual block, and may provide this coded block to adder 62 for later reconstructing for use as part of a reference frame. The prediction unit 41 also provides syntax elements such as motion vectors, intra-mode indicators, partition information, and other such syntax information to the entropy coding unit 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, e.g., to select an appropriate coding mode for each block of video data.
[0028] In some embodiments, motion estimator 42 determines the inter-prediction mode for a current video frame 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 predictive block within a reference video frame according to a predetermined pattern within a sequence of video frames. Motion estimation performed by motion estimator 42 is the process of generating motion vectors that estimate the motion of a video block. The motion vector may indicate, for example, the displacement of a PU of a video block within the current video frame or picture relative to a predictive block within a reference frame (or other coding unit) relative to a current block to be coded within 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, such as block vectors, for intra BC coding in a manner similar to the determination of motion vectors by motion estimator 42 for inter prediction, or may utilize motion estimator 42 to determine block vectors.
[0029] A prediction block is a block of a reference frame that is considered to closely correspond to a PU of a video block to be coded in terms of pixel difference, which may be determined by sum of absolute difference (SAD), sum of square difference (SSD), or other difference measure. In some embodiments, 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, eighth-pixel, or other fractional-pixel locations of the reference frame. Thus, motion estimation unit 42 may perform motion search for whole pixel locations and fractional-pixel locations to output motion vectors with fractional-pixel precision.
[0030] For a PU of a video block of an inter-predictively coded frame, the motion estimation unit 42 calculates a motion vector 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 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 involve fetching or generating a predictive block based on the motion vector determined by motion estimation unit 42. Upon receiving the motion vector for the PU of the current video block, motion compensation unit 44 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 difference components, chroma difference components, or both. Motion compensation unit 44 may also generate syntax elements related to the video blocks of the video frame for use by video decoder 30 in decoding the video blocks of the video frame. The syntax elements may include, for example, syntax elements defining motion vectors used to identify predictive blocks, any flags indicating prediction modes, 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 embodiments, the intra BC unit 48 may generate a vector to capture a predictive block in a manner similar to that described above with respect to the motion estimation unit 42 and the motion compensation unit 44, except that the predictive block is in the same frame as the current block being coded, and the vector is referred to as a block vector, as opposed to a motion vector. Specifically, the intra BC unit 48 may determine an intra prediction mode to use to code the current block. In some examples, the intra BC unit 48 may code the current block using various intra prediction modes, e.g., during separate coding passes, and analyze the performance of the intra prediction modes through rate-distortion analysis. The intra BC unit 48 may then select an appropriate intra prediction mode from the various tested intra prediction modes to use to generate an intra mode indicator. For example, the intra BC unit 48 may use rate-distortion analysis to calculate rate-distortion values for the various tested intra prediction modes and select the intra prediction mode with the best rate-distortion characteristics from 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 a coded block, along with the amount of distortion (or error) between the coded block and the original block that was coded to generate the coded block. The intra BC unit 48 may calculate the distortion-to-rate ratio for various coded blocks to determine the intra prediction mode that provides 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 in accordance with embodiments described herein. In either case, for intra block copying, the predictive block may be a block that is considered to closely correspond 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 calculating 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 coded, 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 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 an intra-prediction mode to use 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 representing the selected intra-prediction mode for the block to the entropy coding unit 56. The entropy coding unit 56 may encode information indicating 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 converts the residual video data into residual transform coefficients using a transform, such as a discrete cosine transform (DCT) 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 54 may then perform a scan of a matrix containing the quantized transform coefficients. Alternatively, the entropy encoder 56 may perform the scan.
[0038] Following quantization, entropy coder 56 entropy codes 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 coding (PIPE), or another entropy coding technique or technology. The coded bitstream may then be transmitted to video decoder 30 or recorded on recording device 32 for later transmission to or retrieval by video decoder 30. Entropy coder 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 reference blocks for predicting other video blocks. As mentioned above, motion compensation unit 44 may generate motion-compensated prediction blocks from one or more reference blocks of frames 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] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced 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 for inter predicting another video block in a subsequent video frame.
[0041] 3 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-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 motion vectors 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 embodiments of the present application. Also, in some examples, embodiments of the present disclosure may be divided among one or more units of video decoder 30. For example, intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of video decoder 30, such as motion compensation unit 82, intra prediction processing unit 84, and entropy decoding unit 80. 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 encode video data by video decoder 30 (e.g., in an intra-predictive coding mode or an inter-predictive coding mode). Video data memory 79 and 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, video data memory 79 and DPB 92 are depicted as two separate components of video decoder 30 in FIG. 3 . However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, video data memory 79 may be on-chip with other components of 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 processing unit 81.
[0045] When a video frame is coded as an intra-predictively 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 the 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 processor 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 decoder 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 as defined by video encoder 20.
[0048] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for video blocks of the 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 the prediction mode (e.g., intra-prediction or inter-prediction) used to encode the video blocks of the video frame, the inter-prediction frame type (e.g., B or P), configuration information for one or more of the reference frame lists for the frame, the motion vectors of each inter-predictively coded video block in the frame, the inter-prediction state of each inter-predictively coded video block of the frame, and other information for decoding the video blocks in the current video frame.
[0049] Similarly, the 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 for the video blocks of the frame that are within the reconstructed region and that should be stored in DPB 92, block vectors for each intra BC predicted video block of the frame, the intra BC prediction state for each intra BC predicted video block of the frame, and other information for decoding the 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 a reference block during encoding of the video block by video encoder 20. In this case, motion compensation unit 82 may determine the interpolation filter used by video encoder 20 from the received syntax element 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 motion compensation unit 82 or intra BC unit 85 generates a predictive block for the current video block based on the vectors and other syntax elements, summer 90 reconstructs a decoded video block for the current video block by summing the residual block from inverse transform processor 88 with the corresponding predictive block generated by motion compensation unit 82 and intra BC unit 85. An in-loop filter (not shown) may be disposed between summer 90 and DPB 92 for further processing the decoded video block. The decoded video block for a given frame is then stored in DPB 92, which stores reference frames used for subsequent motion compensation of the next video block. DPB 92 or a memory device separate from DPB 92 may also store 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, video encoder 20 (more specifically, divider 45) generates a coded representation of a frame by first dividing the frame into a set of coding tree units (CTUs). A video frame may include an integer number of CTUs sequentially ordered in raster scan order from left to right and top to bottom. Each CTU is the largest logical coding unit, and the width and height of a CTU are signaled by video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, which may be 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) consisting of luma samples, a corresponding coding tree block consisting of two chrominance samples, and syntax elements used to encode the samples in the coding tree block. The syntax elements describe the characteristics 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 black and white pictures or pictures with three distinct color planes, a CTU may include a single coding tree block and syntax elements used to encode the samples of the coding tree block. A coding tree block may be an NxN block of samples.
[0055] To achieve better performance, 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 a CTU to divide 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 32×32 block size. Among the four smaller CUs, CU 410 and CU 420 are each partitioned into four CUs with a 16×16 block size. Two 16×16 CUs, 430 and 440, are further partitioned into four CUs with an 8×8 block size. FIG. 4D illustrates a quadtree data structure showing the final result of the partitioning process of the CTU 400 as illustrated in FIG. 4C, with each leaf node of the quadtree corresponding to one CU of a respective size ranging from 32×32 to 8×8. Similar to the CTU illustrated in FIG. 4B, 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 encode the samples of the coding block. In a monochrome picture or a picture with three distinct color planes, a CU may include a single coding block and syntax structures used to encode the samples of the coding block. Note that the quadtree partitioning illustrated in FIGS. 4C and 4D is for illustrative purposes only; a CTU may be partitioned into CUs based on quadtree, ternary, or binary tree partitioning to suit 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 Figure 4E, there are five division types: 4-way division, horizontal 2-way division, vertical 2-way division, horizontal 3-way division, and vertical 3-way division.
[0056] In some embodiments, 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 to which 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 block. In a monochrome picture or a picture with three separate color planes, a PU may include a single prediction block and syntax structures used to predict the prediction block. Video encoder 20 may generate predicted luma, Cb and Cr blocks for luma, 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 the 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 a predictive luma block, a predictive Cb block, and a predictive Cr block for one or more PUs in a CU, 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, 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] Furthermore, 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 CU's luma residual block. The Cb transform block may be a sub-block of the CU's Cb residual block. The Cr transform block may be a sub-block of the CU's Cr residual block. In monochrome pictures or pictures with three separate color planes, a TU may include a single transform block and syntax structures used to transform the transform block samples.
[0060] Video encoder 20 may apply one or more transforms to a luma transform block of a 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 by 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 encode 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, the video encoder 20 may output a bitstream including a series of bits forming a representation of the coded frame and associated data, which may be stored on a recording device 32 or transmitted to a 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 frames 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 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 TUs of the current CU to reconstruct residual blocks associated with the TUs of the current CU. Video decoder 30 also reconstructs coding blocks of the current CU by adding samples of predictive blocks for PUs of the current CU to samples of transform blocks of corresponding TUs of the current CU. Video decoder 30 may reconstruct a frame after reconstructing coding blocks for each CU of the frame.
[0063] As mentioned above, video coding achieves video compression primarily using two modes: intra-frame prediction (i.e., intra-prediction) and inter-frame prediction (i.e., inter-prediction). Palette-based coding is another coding method adopted by many video coding standards. Palette-based coding is particularly suitable for encoding content generated on a screen, in which a video coder (e.g., video encoder 20 or video decoder 30) forms a palette table of colors to represent video data of a given block. The palette table includes the most dominant (e.g., frequently used) pixel values in the given block. Pixel values that are not frequently represented in the video data of a given block are either not included in the palette table or are included in the palette table as avoided colors.
[0064] Each entry in the palette table contains an index for a corresponding pixel value in the palette table. The 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 coded 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 from the most recently used palette table. In some embodiments, 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 as, larger than, or smaller than 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) that indicates that the associated input of the palette predictor is included in the palette table or a second value (e.g., a binary 0) that indicates 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 embodiments, some entries in 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 that indicate pixel values for the luma component and two chroma components associated with the entry, where m represents the bit depth of the video data. While multiple m-bit values are required for directly signaled palette entries, palette entries derived from a palette predictor require only a one-bit flag. Thus, signaling some or all of the palette entries using a 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, the palette predictor for a block is determined based on the 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. Therefore, the palette predictor cannot be generated using entries in the previously used palette table. In such cases, a set of palette predictor initializers, whose values are used to generate the palette predictor when the previously used palette table is unavailable, may be signaled in a sequence parameter set (SPS) and / or a picture parameter set (PPS). An SPS generally refers to a syntactic structure of syntax elements that fits into a series 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 syntactic 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. Therefore, 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 efficient encoding transformations using context coding and bypass coding in accordance with some implementations of the present disclosure.
[0070] Transform coefficient coding in VVC and transform coefficient coding in HEVC are similar because both use non-overlapping coefficient groups (also called CGs or sub-blocks). However, there are some differences between the two schemes. In HEVC, each CG of a coefficient has a fixed size of 4x4. In VVC Draft 6, the CG size depends on the TB size. As a result, various CG sizes (1x16, 2x8, 8x2, 2x4, 4x2, and 16x1) are available in VVC. CGs within a coding block and transform coefficients within a CG are coded according to a predefined scan order.
[0071] To limit the maximum number of context coding bins (CCBs) per pixel, the region of the TB and the type of video component (i.e., luma component vs. chroma component) are used to derive the maximum number of context coding bins (CCBs) of the TB. In some embodiments, the maximum number of context coding bins is equal to TB_zosize*1.75, where TB_zosize represents the number of samples inside the TB after zeroing out coefficients. Note that coded_sub_block_flag is a flag indicating whether the CG contains non-zero coefficients or not, and is not taken into account for the CCB count.
[0072] Coefficient zeroing is an operation performed on forced coefficients of a transform block located in a region of the transform block that are set to zero. For example, in current VVC, a 64x64 TB has an associated zeroing operation. As a result, all transform coefficients located outside the top-left 32x32 region of the 64x64 TB are forced to zero. In practice, in current VVC, the coefficient zeroing operation for any transform block having a size greater than 32 along a dimension is performed such that coefficients located beyond the top-left 32x32 region are forced to zero along that dimension.
[0073] For coding transform coefficients in VVC, the variable remBinsPass1 is initially set to the maximum number of context coding bins (MCCBs) allowed. During the encoding process, the variable is decremented by one for each context coding bin signaled. While remBinsPass1 is 4 or greater, coefficients are signaled using all context coding bins in the first pass, along with syntax elements including sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag. The remaining level information for the coefficients is coded in the second pass using Golomb-Rice coding and bypass coding bins, along with the abs_remainder syntax element. If remBinsPass1 becomes less than 4 during the first-pass encoding, the current coefficient is not coded in the first pass and is directly coded in the second pass using Golomb-Rice coding and bypass coding bins with the dec_abs_level syntax element. After all the above level coding, the sign_Flag of all scan positions where sig_coeff_flag is equal to 1 is finally coded as bypass bins. This process is illustrated in Figure 5A. remBinsPass1 is a reset for all TBs. The transition from using context coding bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag to using bypass coding bins for the remaining coefficients occurs at most once per TB. For a coefficient sub-block, if remBinsPass1 is less than 4 before coding its very first coefficient, the entire coefficient sub-block is coded using bypass coding bins.
[0074] Unlike HEVC, in which one residual coding scheme is designed for coding both transform coefficients and transform skip coefficients, VVC employs two separate residual coding schemes, one for transform coefficients and one for transform skip coefficients (i.e., residuals).
[0075] For example, it has been observed that the statistical properties of the residual in transform skip mode are different from those of the transform coefficients, and there is no energy compaction around the low frequency components. Residual coding has been modified to account for different signal properties of the (spatial) transform skip residual, including:
[0076] (1) No signaling of the final x / y position;
[0077] (2) coded sub-block flags coded for all sub-blocks except the DC sub-block when all previous flags are equal to 0;
[0078] (3) sig_coeff_flag context modeling with two neighboring coefficients;
[0079] (4) par_level_flag to use only one context model;
[0080] (5) more than five, seven, or nine additional flags;
[0081] (6) Derivation of modified Rice parameters for the remaining binarization process; and
[0082] (7) The context modeling for the sign flag is determined based on the coefficient values of the left neighbor and the upper neighbor, and the sign flag is parsed after sig_coeff_flag to keep all the context coding bins together.
[0083] As shown in Figure 5B, the syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, and par_level_flag are coded in an interleaved manner from one residual sample to another in the first pass, followed by coding abs_level_gtX_flag by bit plane in the second pass and abs_remainder in the third pass.
[0084] Path 1: sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag
[0085] Path 2: abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag
[0086] Pass 3: abs_remainder
[0087] FIG. 6 is a block diagram illustrating an example process of dependent scalar quantization according to some implementations of this disclosure.
[0088] In the current VVC, the maximum QP value is extended to 51-63, and the initial QP signaling is changed accordingly. When a non-zero value of slice_qp_delta is coded, the initial value of SliceQpY can be modified at the slice segment layer. For transform skip blocks, the minimum allowed QP value is defined as 4, since when QP equals 1, the quantization step size becomes 1.
[0089] In addition, the scalar quantization used in HEVC is adapted to a novel concept called "dependent scalar quantization." Dependent scalar quantization refers to a technique in which a set of accepted reconstructed values of a transform coefficient depends on the value of the transform coefficient level preceding the current transform coefficient level in the reconstruction order. Accepted reconstructed vectors are more densely packed into an N-dimensional vector space (N represents the number of transform coefficients in a transform block) compared to the conventional independent scalar quantization used in HEVC. That is, for a given average number of accepted reconstructed vectors per N-dimensional unit volume, the average distortion between the input vector and the nearest reconstructed vector is reduced. The dependent scalar quantization technique is realized by (a) defining two scalar quantizers with different reconstruction levels and (b) defining a process for switching between the two scalar quantizers.
[0090] The two scalar quantizers used are denoted by Q0 and Q1 and are shown in Figure 6. The position of the available reconstruction levels is uniquely defined by the quantization step size Δ. The scalar quantizer used (Q0 or Q1) is not explicitly signaled in the bitstream. Instead, the quantizer used for a current transform coefficient is determined by the parity of the level of the transform coefficient that precedes the current transform coefficient in the coding or reconstruction order.
[0091] FIG. 7 is a block diagram illustrating an example state machine for switching between two different scalar quantizers, according to some implementations of the present disclosure.
[0092] As shown in Figure 7, switching between two scalar quantizers (Q0 and Q1) is realized by a state machine with four quantizer states (QState). QState can adopt four different values: 0, 1, 2, and 3. The QState value is uniquely determined by the parity of the transform coefficient level preceding the current transform coefficient in the encoding / reconstruction order. At the start of dequantization of a transform block, QState is set to 0. The transform coefficients are reconstructed in scan order (i.e., the same order as entropy decoding). After the current transform coefficient is reconstructed, the state is updated as shown in Figure 7, where k represents the value of the transform coefficient level.
[0093] Signaling default scaling matrices and user-defined scaling matrices is also supported. The scaling matrices in default mode are all flat and the elements are equal to 16 for all TB sizes. IBC and intra coding modes currently share the same scaling matrix. Therefore, in case of a USER_DEFINED matrix, the MatrixType and MatrixType_DC numbers are updated as follows:
[0094] MatrixType: 30 = 2 (for intra & IBC / inter) x 3 (Y / Cb / Cr components) x 5 (size of square TB: chrominance 2 x 2 to 32 x 32, luminance 4 x 4 to 64 x 64)
[0095] MatrixType_DC: 14 = 2 (2 for Intra & IBC / Inter x 1 for Y component) x 3 (TB size: 16 x 16, 32 x 32, 64 x 64) + 4 (2 for Intra & IBC / Inter x 2 for Cb / Cr component) x 2 (TB size: 16 x 16, 32 x 32)
[0096] DC values are coded separately for scaling matrices such as 16x16, 32x32, and 64x64. For TBs smaller than 8x8, all elements are signaled in one scaling matrix. If the TB size is 8x8 or larger, only 64 elements in one 8x8 scaling matrix are signaled as the base scaling matrix. To obtain a square matrix larger than 8x8, the 8x8 base scaling matrix is upsampled (by copying elements) to the corresponding square size (i.e., 16x16, 32x32, 64x64). When zeroing high-frequency coefficients is applied to a 64-point transform, the corresponding high frequencies in the scaling matrix are also zeroed. That is, if the width or height of the TB is 32 or larger, only the left half or upper half of the coefficients are kept, and the remaining coefficients are assigned to zero. Furthermore, the number of elements signaled for a 64x64 scaling matrix is also reduced from 8x8 to three 4x4 subvector-matrices because the bottom-right 4x4 elements are unused.
[0097] The choice of the probability model for the syntax elements relating to the absolute values of the transform coefficient levels depends on the values of the absolute levels or partially reconstructed absolute levels in a local neighborhood.
[0098] The selected probability model depends on the sum of the absolute levels (or partially reconstructed absolute levels) in the local neighborhood and the number of absolute levels in the local neighborhood greater than 0 (given by the number of sig_coeff_flags equal to 1). The context modeling and binarization process rely on the following measurements about the local neighborhood: numSig: number of non-zero levels in the local neighborhood, sumAbs1: the sum of the partially reconstructed absolute levels (absLevel1) after the first pass in the local neighborhood, sumAbs: the sum of the reconstructed absolute levels in the local neighborhood, Diagonal position (d): The sum of the horizontal and vertical coordinates of the current scan position within the transformation block.
[0099] Based on the values of numSig, sumAbs1, and d, a probability model for encoding sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag is selected. The Rice parameters for binarizing abs_remainder and dec_abs_level are selected based on the values of sumAbs and numSig.
[0100] In the current VVC, the reduced 32-point MTS (also called RMTS32) is based on skipping high-frequency coefficients and is used to reduce the computational complexity of the 32-point DST-7 / DCT-8. The 32-point MTS also involves a change in the coding of coefficients including all types of zero-setting (i.e., RMTS32 and existing zero-setting for high-frequency components in DCT2). Specifically, the binarization process for coding the last non-zero coefficient position is coded based on the reduced TU size, and the selection of the context model for coding the last non-zero coefficient position is determined by the original TU size. In addition, a 60-point context model is used to code the sig_coeff_flag of the transform coefficient. The context model index is selected based on the sum of the maximum value of five previously partially reconstructed absolute levels, called locSumAbsPass1, and the dependent quantization state QState, as follows:
[0101] If cIdx is equal to 0, ctxInc is derived as follows:
[0102] ctxInc=12*Max(0,QState-1)+Min((locSumAbsPass1+1)>>1,3)+(d<2?8:(d<5?4:0))
[0103] Otherwise (if cIdx is greater than 0), ctxInc is derived as follows:
[0104] ctxInc=36+8*Max(0,QState-1)+Min((locSumAbsPass1+1)>>1,3)+(d<2?4:0)
[0105] FIG. 8 is a flow diagram 800 illustrating an example process by which a video decoder performs residual and coefficient coding for a coding block, according to some implementations of this disclosure.
[0106] In VVC, a unified Rice parameter (RicePara) derivation is used to signal the syntax of abs_remainder and dec_abs_level when coding coefficients (e.g., for coding blocks in transform skip mode) or residuals (e.g., for coding blocks in transform mode). The only difference is that the base level baseLevel is set to 4 and 0 to code abs_remainder and dec_abs_level, respectively. The Rice parameter is determined based on the sum of the absolute levels of the five neighboring transform coefficients in the local template as well as the corresponding base level, as follows:
[0107] RicePara=RiceParTable[max(min(31,sumAbs-5*baseLevel),0)]
[0108] In other words, the binary codewords for the syntax elements abs_remainder and dec_abs_level are adaptively determined according to the level information of neighboring coefficients. This codeword determination is performed for each sample, so additional logic is required to handle this codeword adaptation for coefficient or residual coding.
[0109] Similarly, when encoding a residual block in transform skip mode, the binary codeword for the syntax element abs_remainder is adaptively determined according to the level information of neighboring residual samples.
[0110] Furthermore, when encoding syntax elements related to residual coding or transform coefficient coding, the selection of the probability model depends on the level information of neighboring levels, requiring additional logic and additional context models.
[0111] In this disclosure, several residual and coefficient decoding processes are presented to address the aforementioned issues and improve coding efficiency.
[0112] In some embodiments, a video coder uses a variable set of binary codewords to code certain syntax elements, such as abs_remainder, in coding residuals or transform coefficients. The video coder selects a particular set of binary codewords depending on some other coded information of the current block, such as the quantization parameter (QP) of the transform block / coding block, slice, sequence, CTU, CU, etc., the prediction mode of the CU (e.g., IBC mode or intra or inter), or the slice type (e.g., I slice, P slice, or B slice). The video coder may derive the variable set of binary codewords using one of the example methods listed below. 1. The same procedure used in the current VVC to determine the codeword for abs_remainder is used, but with different Rice parameters. 2. k-th order Exp-Golomb binarization process (EGk) 3. Binary processing of restricted k-th order Exp-Golomb
[0113] In these exemplary methods mentioned above, the video coder may use different values of the Rice parameter to derive different sets of binary codewords for encoding the residual or transform coefficients. In some embodiments, for a given block of residual samples, the Rice parameter value is determined according to the CU QP, denoted as QPcu, instead of the neighboring level information. As shown in Table 1, one specific example is shown below, where TH1~TH4 are predetermined threshold values satisfying (TH1 < TH2 < TH3 < TH4), and K0~K4 are predetermined Rice parameter values. It is worth noting that the same logic can actually be implemented differently. For example, as shown in Table 1, a certain formula or look-up table may be used to derive the same Rice parameter from the QP value of the current CU. In other words, the QP value here serves two purposes: defining the quantization level and determining the Rice parameter.
[0114]
Table 1
[0115] Note that the set of Rice parameters and corresponding thresholds can be all or a subset of all the Rice parameters and corresponding thresholds related to the determination of the codewords for syntax elements. The set of Rice parameters and corresponding thresholds can be signaled at different levels in the video bitstream. For example, this set can be signaled at the sequence level (e.g., the set of sequence parameters), picture level (e.g., the set of picture parameters), slice level (e.g., the slice header), coding tree unit (CTU) level or coding unit (CU) level.
[0116] In one example, the Rice parameter used to determine the codeword for encoding the abs_remainder syntax element in transform skip residual coding is itself signaled in the slice header, PPS header, and / or SPS header. The signaled Rice parameter is used to determine the codeword for encoding the syntax abs_remainder when the CU is coded as a skip mode transform and associated with such a slice header / PPS / SPS. In some embodiments, a larger Rice parameter value results in a more evenly distributed codeword length.
[0117] In some embodiments, the video coder uses a set of parameters and corresponding thresholds related to determining a codeword for a syntax element for transform coefficient coding and / or transform skip residual coding. The video coder may also use different sets depending on whether the current block contains luma residuals / coefficients or chroma residuals / coefficients. The determined codeword is used as a binarization codeword when encoding the syntax element by an entropy coder, e.g., arithmetic coding.
[0118] For example, the codeword for abs_remainder associated with transform residual coding used in current VVC is used for both luma and chroma blocks. To improve the encoding process, a video coder can use different constant Rice parameters for luma and chroma blocks (K1 and K2 are integers, e.g., K1 for luma blocks and K2 for chroma blocks).
[0119] In some embodiments, a set of parameter values (e.g., K1-K4) and / or thresholds (e.g., TH1-TH4) associated with codeword decisions for syntax elements of transform coefficient coding and / or transform skip residual coding may be signaled into the bitstream, and separate sets of parameter values (e.g., K1-K4) and / or thresholds (e.g., TH1-TH4) may be signaled for luma blocks and chroma blocks. The determined codewords are used as binarization codewords when encoding the syntax elements by an entropy coder, e.g., arithmetic coding.
[0120] To implement the above-described improved process for residual / coefficient decoding, video decoder 30 first receives one or more syntax elements and video data corresponding to a coding unit from a bitstream (810). Video decoder 30 then determines a Rice parameter value as a function of the one or more syntax elements (820).
[0121] In some embodiments, video decoder 30 determines the Rice parameter value based on information (e.g., one or more syntax elements) included in the coding block. For example, the one or more syntax elements may include a quantization parameter (QP), and the video coder may determine the QP (e.g., QP CU ) to a set of thresholds (e.g., TH1-TH4), each having a candidate Rice parameter value (e.g., K0-K4). The video coder selects a pair of thresholds (e.g., QP CU is between TH1 and TH2), and then determine the Rice parameter value as one of the two candidate Rice parameters corresponding to the pair of thresholds, as described above. In some embodiments, positive infinity and negative infinity are also considered as implicit thresholds.
[0122] In some embodiments, the set of thresholds and associated candidate Rice parameter values are fixed (e.g., predetermined) values stored in a memory of video decoder 30. In other words, video decoder 30 determines these values based on the encoding / decoding specifications rather than receiving them from the bitstream. Video decoder 30 then determines the Rice parameter values based on the logic described in Table 1.
[0123] In some embodiments, the thresholds and the associated set of candidate Rice parameter values are variables conveyed in one or more syntax elements in the bitstream. Video decoder 30 then determines these values from information in the bitstream. For example, video decoder 30 receives values for K1 through K4 and values for TH1 through TH4 from the bitstream. Video decoder 30 then determines the Rice parameter values based on the logic described in Table 1.
[0124] In some embodiments, one or more syntax elements include the Rice parameter value itself. As a result, video decoder 30 receives the value of the Rice parameter directly from the bitstream. The Rice parameter value may be 1, 2, 3, or other constant value selected by video encoder 20 based, for example, on rate-distortion analysis. As a result, video decoder 30 forgoes the process described in Table 1 because the value of the Rice parameter is signaled directly in the bitstream.
[0125] Video decoder 30 then decodes from the video data a first codeword and a second codeword for the pixel in the coding unit (830). For example, video decoder 30 converts the first codeword into a parameter (e.g., abs_remainder) for the pixel according to a predetermined mapping relationship generated using the previously determined Rice parameter value (840). Video decoder 30 converts the second codeword into a symbolic value for the parameter (850). Video decoder 30 determines a quantified pixel value for the pixel based on the parameter and the symbolic value (860).
[0126] In some embodiments, video decoder 30 uses separate syntax elements (e.g., respective Rice parameters) to decode the luma and chroma components of a coding unit. For example, the one or more syntax elements further include a first subset of syntax elements associated with a first component (e.g., luma) of the coding unit and a second subset of syntax elements associated with a second component (e.g., chroma) of the coding unit. As a result, the video encoder uses separate Rice parameter values and separate thresholds for the luma and chroma components (e.g., a set of K1-K4 and TH1-TH4 for the luma component, another set of K1-K4 and TH1-TH4 for the first chroma component, and another set of K1-K4 and TH1-TH4 for the second chroma component). These separate Rice parameter values and thresholds may be determined based on the above-described process (e.g., may be predetermined, signaled directly in the bitstream, or indirectly determined by a QP value).
[0127] In some embodiments, there is at least one difference between a first subset of syntax elements associated with a first component of a coding unit (e.g., luma) and a second subset associated with a second component of the coding unit (e.g., chroma).
[0128] In some embodiments, one or more syntax elements are signaled at a level selected from the group consisting of sequence, picture, slice, tile, CTU, CU, transform unit (TU), and transform block (TB). For example, once video decoder 30 determines Rice parameter values and / or thresholds at a particular level, all coding units at that level or below share the same determined Rice parameter values and / or thresholds for decoding.
[0129] In some embodiments, the first codeword is associated with encoding transform coefficients of pixels in the coding unit (eg, when the coding unit is coded using a transform mode).
[0130] In some embodiments, when the coding unit is a transform skip mode coding unit, video decoder 30 decodes from the video data a first group of codewords for pixels in the transform skip mode coding unit, then derives initial level values from the first group of codewords and derives quantified residuals for the pixels from the parameters, symbol values, and initial level values.
[0131] In some alternative embodiments, the first codeword is associated with encoding a residual of a pixel in the coding unit (eg, when the coding unit is coded using transform skip mode).
[0132] In some embodiments, the predetermined mapping relationship is in the form of a look-up table (eg, as shown in Table 1).
[0133] In some embodiments, the video decoder 30 generates the predetermined mapping relationship by performing the steps of calculating binarization processing parameters using the determined Rice parameters, determining a codeword prefix value and an optional suffix value of the corresponding codeword for one of the set of candidate residual values using the binarization processing parameters, and repeating the determining step for another of the set of candidate residual values until the last one of the set of candidate residual values has been determined.
[0134] In some embodiments, the prefix values of the codewords are determined using a Truncated Rice binarization process.
[0135] In some embodiments, the suffix value of the codeword is determined when the prefix value is a bit string of length 6 with all bits equal to 1.
[0136] FIG. 9 is a block diagram illustrating an example of a context-adaptive binary arithmetic coding (CABAC) engine, according to some implementations of the present disclosure.
[0137] Context-adaptive binary arithmetic coding (CABAC) is a form of entropy coding used in many video coding standards, such as H.264 / MPEG-4 AVC, High Efficiency Video Coding (HEVC), and VVC. CABAC is based on arithmetic coding and meets the requirements of video coding standards with few modifications. For example, CABAC encodes binary symbols, maintains low complexity, and enables probability modeling for the more frequently used bits of every symbol. The probability model is adaptively selected based on the local context, allowing for better modeling of probabilities because coding modes are usually well correlated locally. Finally, CABAC uses multiplication-free range partitioning by using quantized probability ranges and probability states.
[0138] CABAC has multiple probability models for different contexts. CABAC first converts all non-binary symbols to binary. Then, for each bin (also called "bit"), the encoder selects the probability model to use and then optimizes the probability estimate using information from nearby elements. Finally, arithmetic coding is applied to compress the data.
[0139] Context modeling provides an estimate of the conditional probability of the coding symbol. With the use of an appropriate 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 comprises the following stages:
[0140] 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, except that 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.
[0141] 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 the statistics of recently coded data symbols. The context model stores the probability that each bin is a "1" or a "0."
[0142] Arithmetic coding: The arithmetic coder encodes each bin according to a selected probability model. Note that for each bin there are exactly two subranges (corresponding to "0" and "1").
[0143] 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).
[0144] By decomposing the value of each non-binary syntax element into a set of bins, 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 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 binary representation of the syntax element, or adaptively selected from two or more probability models based on relevant side information (e.g., spatial neighborhood, component, depth, or size of a CU / PU / TU, or location inside a TU). The selection of the probability model is called context modeling. As a key design decision, the latter is typically applied only to the most frequently observed bins, while other bins, which are typically less frequently observed, are processed using a joint, typically zero-order probability model. In this way, CABAC enables selective adaptive probability modeling at the sub-symbol level, thereby providing an efficient means for exploiting inter-symbol redundancy with significantly reduced overall modeling or training 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 reflects the goal of finding a good compromise between the conflicting goals of preventing unnecessary modeling cost overhead and exploiting statistical dependence to a significant extent.
[0145] The parameters of the probability model in CABAC are adaptive, meaning that the adaptation of the model probability to the statistical fluctuations of the bin's source is performed synchronously in a backward-adaptive manner for each bin at both the encoder and decoder; this process is called probability estimation. To this end, each probability model in CABAC can adopt one of 126 distinct states, with the associated model probability value p ranging from [0:01875;0:98125]. Two parameters of each probability model are stored as a 7-bit entry 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).
[0146] 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 code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable media, which correspond to tangible media such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example via a communications protocol. Thus, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable media or (2) communication media, such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures to implement the embodiments described herein. A computer program product may include computer-readable media.
[0147] The terminology used in describing the embodiments herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the claims. As used in describing 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. 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," when 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.
[0148] Although terms such as "first," "second," etc. may be used herein to describe various elements, it should 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 embodiments. The first electrode and the second electrode are both electrodes, but are not the same electrode.
[0149] 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 embodiments will be apparent to those skilled in the art having the benefit of the teachings presented in the foregoing description and the associated drawings. The embodiments have been chosen and described 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 embodiments, and to best utilize the basic principles and various embodiments with various modifications as suited to the particular uses contemplated. It is therefore to be understood that the scope of the claims is not limited to the particular examples of the disclosed embodiments and modifications thereof, but that other embodiments are contemplated as being within the scope of the appended claims.
Claims
1. 1. A method of video decoding, comprising: receiving, from a bitstream, one or more syntax elements and video data corresponding to a coding unit; determining Rice parameters in response to the one or more syntax elements; decoding, from the video data, first and second codewords for samples in the coding unit; converting the first codeword into parameters of the samples according to a predetermined mapping relationship generated using the determined Rice parameters; converting the second codeword into a symbolic value for the parameter; determining residual sample values for the samples based on the parameters and the symbol values; Equipped with determining a parameter value based on the one or more syntax elements; determining the Rice parameters in response to the one or more syntax elements, comparing the parameter value to a set of constant values, each constant value in the set of constant values corresponding to a candidate Rice parameter; determining the Rice parameter as one of candidate Rice parameters corresponding to the set of constant values; A method comprising:
2. 10. The method of claim 1, determining a Rice parameter in response to the one or more syntax elements includes determining the Rice parameter based on whether the residual of the coding unit is in a transform skip mode; determining the Rice parameter based on whether the residual of the coding unit is in the transform skip mode includes setting the Rice parameter to a constant value for the transform unit based on a determination that the residual of the coding unit is in the transform skip mode; A method comprising:
3. The method of claim 1 , wherein the candidate Rice parameters are constant values.
4. 2. The method of claim 1 , wherein the one or more syntax elements include a first subset of syntax elements associated with a first component of the coding unit and a second subset of syntax elements associated with a second component of the coding unit.
5. 5. The method of claim 4, wherein there is at least one difference between the first subset of syntax elements and the second subset of syntax elements.
6. 2. The method of claim 1, wherein the one or more syntax elements are signaled at a level selected from the group consisting of sequence, picture, slice, tile, coding tree unit (CTU), coding unit (CU), transform unit (TU), and transform block (TB).
7. 2. The method of claim 1, wherein the first codeword is associated with encoding transform coefficients of the samples in the coding unit.
8. 2. The method of claim 1, wherein the first codeword is associated with encoding a transform skip residual of the sample in the coding unit.
9. 2. The method of claim 1, wherein determining the Rice parameter as a function of the one or more syntax elements comprises looking up the Rice parameter in a lookup table.
10. 2. The method of claim 1, wherein the predetermined mapping relationship is: calculating binarization processing parameters using the determined Rice parameters; determining a codeword prefix value and an optional corresponding codeword suffix value for one of a set of candidate remainder values using the binarization process parameters; repeating said determining step for another one of said set of candidate remainder values until a final one of said set of candidate remainder values has been determined; The method further comprising generating the
11. 11. The method of claim 10, wherein the prefix values of the codewords are determined using a shortened Rice binarization process.
12. 11. The method of claim 10, wherein the suffix value of the codeword is determined when the prefix value is equal to a bit string of length six with all bits equal to one.
13. 10. The method of claim 1, the coding unit is a transform skip mode coding unit; The method comprises: decoding, from the video data, a first group of codewords for the samples in the transform skip mode coding unit; deriving initial level values from the first group of codewords; deriving a quantized residual of said sample from said parameters, said symbol values and said initial level values; The method further comprises:
14. 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, which, when executed by the one or more processing units, cause the electronic device to perform the method of any one of claims 1 to 13; An electronic device comprising:
15. 15. A non-transitory computer-readable recording medium storing a video bitstream, the video bitstream being generated by the electronic device of claim 14.
16. 14. A computer program comprising instructions that, when executed by a computing device having one or more processors, cause the computing device to perform the method of any one of claims 1 to 13 on a bitstream.
17. A method for storing a bitstream, comprising: generating a bitstream by performing an encoding method; storing the bitstream; Equipped with The encoding method comprises: determining Rice parameters in response to one or more syntax elements; decoding, from video data corresponding to a coding unit, first and second codewords for samples in the coding unit; converting the first codeword into parameters of the samples according to a predetermined mapping relationship generated using the determined Rice parameters; converting the second codeword into a symbolic value for the parameter; determining residual sample values for the samples based on the parameters and the symbol values; Equipped with determining a parameter value based on the one or more syntax elements; determining the Rice parameters in response to the one or more syntax elements, comparing the parameter value to a set of constant values, each constant value in the set of constant values corresponding to a candidate Rice parameter; determining the Rice parameter as one of candidate Rice parameters corresponding to the set of constant values; A method comprising:
Citation Information
Patent Citations
Coefficient level coding in video coding
US20170064336A1