Video encoding method, electronic device, bitstream storage method and program
The MTS scheme addresses the challenge of efficiently encoding and decoding high-definition video data by applying transforms in multiple directions, enhancing processing efficiency and maintaining image quality.
Patent Information
- Application Number
- JP2023118337
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-01-10
- Filing Date
- 2023-07-20
- Publication Date
- 2025-12-25
- Estimated Expiration
- 2040-11-23
AI Technical Summary
Existing video coding technologies face challenges in efficiently encoding and decoding high-definition to 4Kx2K or 8Kx4K digital video data while maintaining image quality, as the amount of video data to be processed increases exponentially.
Implementing a multiple transform selection (MTS) scheme that applies transforms in both horizontal and vertical directions based on a multiple transform selection index, and includes checking for non-zero coefficients in zero-out regions within transform blocks.
Enhances video encoding and decoding efficiency by optimizing transform coding methods, thereby improving the processing of high-resolution video data without compromising image quality.
Smart Images

Figure 0007792378000007 
Figure 0007792378000008 
Figure 0007792378000009
Abstract
Description
[Technical Field]
[0001] This application relates generally to video coding and compression, and more particularly to methods and apparatus for improving and simplifying existing designs of transform coding and coefficient coding methods in the versatile video coding (VVC) standard. [Background technology]
[0002] Digital video is supported by a variety of electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smartphones, video teleconferencing devices, video streaming devices, etc. Electronic devices support digital video in a variety of formats, including 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). Digital video data is transmitted, received, encoded, decoded, and / or stored by implementing video compression / decompression standards defined by the IEEE 802.11b / g (IEEE 802.11b) Video compression typically involves performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove redundancy inherent in video data. In block-based video coding, a video frame is divided into one or more slices, each having multiple video blocks, which may also be called coding tree units (CTUs). Each CTU contains one coding unit (CU) or can be recursively divided into smaller CUs until a predetermined minimum CU size is reached. Each CU (also called a leaf CU) contains one or more transform units (TUs), and each CU also contains one or more prediction units (PUs). Each CU can be coded in either intra-mode, inter-mode, or IBC mode. Video blocks in an intra-coded (I) slice of 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 of a video frame may use spatial prediction with respect to reference samples in neighboring blocks within the same video frame, or temporal prediction with respect to reference samples in other previous and / or future reference video frames.
[0003] Spatial or temporal prediction based on previously coded reference blocks, e.g., neighboring blocks, results in a predicted block for the current video block to be coded. The process of finding the reference block can be achieved by a block matching algorithm. Residual data representing pixel differences between the current block to be coded and the predicted block is called a residual block or prediction error. Inter-coded blocks are coded according to a reference block in a reference frame that forms the predicted block and a motion vector that points to the residual block. The process of determining the motion vector is typically called motion estimation. Intra-coded blocks are coded according to an intra-prediction mode and the residual block. For further compression, the residual block may be transformed from the pixel domain to a transform domain, e.g., the frequency domain, resulting in residual transform coefficients, which may then be quantized. The quantized transform coefficients may first be arranged in a two-dimensional array, scanned to generate a one-dimensional vector of transform coefficients, and then entropy coded into a video bitstream to achieve even greater compression.
[0004] The encoded video bitstream is then stored in a computer-readable storage medium (e.g., flash memory) for access by another electronic device with digital video capabilities, or transmitted directly to an electronic device via wired or wireless connections. The electronic device performs video decompression (which is the opposite process to the video compression described above) by parsing the coded video bitstream to obtain syntax elements from the bitstream, reconstructing digital video data from the coded 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.
[0005] With digital video quality ranging from high definition to 4Kx2K or 8Kx4K, the amount of video data to be encoded / decoded increases exponentially. This poses a challenge: how to encode / decode video data more efficiently while maintaining the image quality of the decoded video data. Summary of the Invention [Problem to be solved by the invention]
[0006] This application describes implementations related to encoding and decoding video data, and more particularly, describes methods and apparatus that improve and simplify existing designs of transform and coefficient coding methods. [Means for solving the problem]
[0007] According to a first aspect of the present application, a video data decoding method includes receiving a bitstream encoding a transform block, the transform block including a non-zero region and a zero-out region, checking whether there is a non-zero coefficient in the zero-out region, determining a scan order index of a last non-zero coefficient of the transform block along a scan direction according to a determination that there is no non-zero coefficient in the zero-out region of the transform block, receiving a value of a multiple transform selection (MTS) index from the bitstream according to a determination that the scan order index of the last non-zero coefficient is greater than a predetermined threshold, and applying respective transforms in both horizontal and vertical directions to transform coefficients of the transform block based on the value of the multiple transform selection (MTS) index.
[0008] 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 a video data decoding method as described above.
[0009] According to a third aspect of the present application, a non-transitory computer-readable storage medium stores a plurality of programs for execution by an electronic device having one or more processing units, the programs, when executed by the one or more processing units, causing the electronic device to perform a video data decoding method as described above. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a block diagram illustrating an example video encoding and decoding system according to some implementations of this disclosure. [Figure 2] FIG. 1 is a block diagram illustrating an example video encoder according to some implementations of this disclosure. [Figure 3] FIG. 2 is a block diagram illustrating an example video decoder according to some implementations of this disclosure. [Figure 4A] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes, in accordance with some implementations of this disclosure. [Figure 4B] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes, in accordance with some implementations of this disclosure. [Figure 4C] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes, in accordance with some implementations of this disclosure. [Figure 4D] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes, in accordance with some implementations of this disclosure. [Figure 4E] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes, in accordance with some implementations of this disclosure. [Figure 5] 1 is a table illustrating an example multiple transform selection (MTS) scheme for transforming residuals of inter-coded and intra-coded blocks, according to some implementations of this disclosure. [Figure 6]1 is a block diagram illustrating an example transform block having non-zero transform coefficients, in accordance with some implementations of the present disclosure. [Figure 7] 10 is a flowchart illustrating an example process by which a video coder implements a technique for encoding block residuals using a multiple transform selection (MTS) scheme, according to some implementations of this disclosure. [Figure 8] FIG. 1 is a block diagram illustrating an example context-adaptive binary arithmetic coding (CABAC) engine, according to some implementations of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0011] The accompanying drawings, which are included to provide a further understanding of the embodiments, and which 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, and like reference numerals refer to corresponding parts.
[0012] Reference will now be made in detail to certain embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to those skilled in the art that various alternatives may be used and the subject matter may be practiced without these specific details without departing from the scope of the claims. For example, it will be apparent to those skilled in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0013] Figure 1 is a block diagram illustrating an example system 10 for encoding and decoding video blocks in parallel, in accordance with some implementations of this disclosure. As shown in Figure 1, system 10 includes a source device 12, which 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 wide variety of electronic devices, including desktop or laptop computers, tablet computers, smartphones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 have wireless communication capabilities.
[0014] In some implementations, destination device 14 may receive encoded video data to be decoded via link 16. Link 16 may include any type of communication medium or device capable of moving encoded video data from source device 12 to destination device 14. In one example, link 16 may comprise a communication 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 communication standard, such as a wireless communication protocol, and transmitted to destination device 14. The communication medium may comprise any wireless or wired communication medium, such as the radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful for facilitating communication from source device 12 to destination device 14.
[0015] In some other implementations, the encoded video data may be transmitted from output interface 22 to storage device 32. The encoded video data in storage device 32 can then be accessed by destination device 14 via input interface 28. Storage 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 any other suitable digital storage medium for storing encoded video data. In a further example, storage device 32 may correspond to a file server or another intermediate storage device capable of holding the encoded video data generated by source device 12. Destination device 14 may access the stored video data from storage device 32 via streaming or download. The file server may be any type of computer capable of storing encoded video data and transmitting the encoded video data to destination device 14. Exemplary file servers include a web server, an FTP server, a network-attached storage device, or a local disk drive. Destination device 14 can access the encoded video data via any standard data connection, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from storage device 32 can be a streaming transmission, a download transmission, or a combination of both.
[0016] As shown in FIG. 1 , source device 12 includes video source 18, video encoder 20, and 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 implementations described herein are applicable to video encoding generally and may be applicable to wireless and / or wired applications.
[0017] The captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be transmitted directly to destination device 14 via output interface 22 of source device 12. The encoded video data may also be stored in storage device 32 for subsequent 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.
[0018] 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 modem and may receive encoded video data over link 16. The encoded video data communicated over link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be transmitted over a communications medium, stored on a storage medium, stored on a file server, or included within the encoded video data.
[0019] In some implementations, destination device 14 may include a display device 34, which may be an integrated display device, and 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 (LED), a plasma display, an organic light emitting diode (OLED), or another type of display device.
[0020] Video encoder 20 and video decoder 30 may operate in accordance with proprietary or industry standards, such as VVC, HEVC, MPEG-4 Part 10, AVC (Advanced video Coding), or extensions of such 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.
[0021] Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. If implemented partially in software, an electronic device may store software instructions 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 operations 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) within the respective device.
[0022] 2 is a block diagram illustrating an example video encoder 20 according to some implementations described herein. Video encoder 20 may perform intra-predictive and inter-predictive coding of video blocks within a video frame. 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.
[0023] As shown in FIG. 2 , video encoder 20 includes video data memory 40, prediction processing unit 41, decoded picture buffer (DPB) 64, adder 50, transform processing unit 52, quantization unit 54, and entropy coding unit 56. Prediction processing unit 41 further includes motion estimation unit 42, motion compensation unit 44, partitioning unit 45, intra-prediction processing unit 46, and intra-block copy (BC) unit 48. In some implementations, video encoder 20 also includes inverse quantization unit 58, inverse transform processing unit 60, and adder 62 for video block reconstruction. A deblocking filter (not shown) may be disposed between adder 62 and DPB 64 to filter block boundaries and remove blockiness artifacts from the reconstructed video. An in-loop filter (not shown) may be used to filter the output of adder 62 in addition to the deblocking filter. Video encoder 20 may take the form of fixed or programmable hardware units, or may be divided among one or more of the illustrated fixed or programmable hardware units. This can be done.
[0024] 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 stores reference video data for use in encoding video data by video encoder 20 (e.g., in intra-predictive or inter-predictive coding modes). Video data memory 40 and DPB 64 may be formed by any of a variety of memory devices. In various examples, video data memory 40 may be on-chip with other components of video encoder 20 or off-chip with these components.
[0025] As shown in FIG. 2, after receiving video data, partitioning unit 45 within prediction processing unit 41 partitions the video data into video blocks. This partitioning may also include dividing the video frame into slices, tiles, or other larger coding units (CUs) according to a predefined partitioning structure, such as a quadtree structure, associated with the video data. The video frame may be partitioned into multiple video blocks (or sets of video blocks called tiles). Prediction processing unit 41 may select one of multiple possible predictive coding modes, such as one of one or more inter-predictive coding modes of multiple intra-predictive coding modes, for the current video block based on the error result (e.g., code rate and distortion level). Prediction processing unit 41 may provide the resulting intra- or inter-predictive coded block to adder 50 to generate a residual block, which may then be provided to adder 62, which reconstructs the coded block for use as part of a reference frame. Prediction processing unit 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partition information, and other such syntax information, to entropy coding unit 56.
[0026] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing 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 to be coded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 perform inter-prediction coding of the current video block relative to one or more predictive blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may, for example, perform multiple coding passes to select an appropriate coding mode for each block of video data.
[0027] In some implementations, motion estimation unit 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 in a current video frame relative to a predictive block in a reference video frame according to a predetermined pattern in a sequence of video frames. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors, which estimate the motion of video blocks. The motion vector may, for example, indicate the displacement of a PU of a video block in a current video frame or picture relative to a predictive block in a reference frame (or other coding unit) relative to a current block being coded in the current frame (or other coding unit). The predetermined pattern may designate a video frame in the sequence as a P frame or a B frame. Intra BC unit 48 may determine vectors, e.g., block vectors, for intra BC coding in a manner similar to the determination of motion vectors by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine block vectors.
[0028] A prediction block is a block of a reference frame that is deemed to closely match a PU of a video block to be encoded in terms of pixel differences, which may be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics. In some implementations, video encoder 20 may calculate values for sub-integer pixel positions of the reference frame stored in DPB 64. For example, video encoder 20 may interpolate values for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, motion estimator 42 may perform motion search for whole pixel positions and fractional pixel positions and output motion vectors with fractional pixel accuracy.
[0029] Motion estimation unit 42 calculates a motion vector for a PU of a video block in an inter-predictively coded frame by comparing the position of the PU with the position of a predictive block of a reference frame selected from a first reference frame list (List0) or a second reference frame list (List1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy coding unit 56.
[0030] The motion compensation performed by motion compensation unit 44 may include fetching or generating a predictive block based on the motion vector determined by motion estimation unit 42. Upon receiving the motion vector for the PU of the current video block, motion compensation unit 44 may locate the predictive block for which the motion vector indicates one of the reference frame lists, retrieve the predictive block from DPB 64, and forward 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 being coded. The pixel difference values forming the residual video block may include differences in luma or chroma components, or both. Motion compensation unit 44 may also generate syntax elements associated with 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 the motion vector used to identify the predictive block, any flags indicating a prediction mode, or any other syntax information described herein. It should be noted that motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are shown separately for conceptual purposes.
[0031] In some implementations, the intra BC unit 48 can generate vectors and fetch predictive blocks in a manner similar to that described above in connection with the motion estimation unit 42 and the motion compensation unit 44, except that the predictive block is within the same frame as the current block being coded, and the vectors are called block vectors, as opposed to motion vectors. In particular, the intra BC unit 48 can determine the intra prediction mode to use to code the current block. In some examples, the intra BC unit 48 can code the current block using various intra prediction modes, e.g., during separate coding passes, and test their performance through rate-distortion analysis. The intra BC unit 48 can then use a suitable intra prediction mode among the various tried intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 can calculate rate-distortion values for the various tried intra prediction modes using rate-distortion analysis, and select the intra prediction mode with the best rate-distortion characteristics among the tried modes as the suitable intra prediction mode to use. Rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was coded to produce the coded block, as well as the bit rate (i.e., number of bits) used to produce the coded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various coded blocks to determine which intra prediction mode exhibits the best rate-distortion value for the block.
[0032] In other examples, the intra BC unit 48 may use, in whole or in part, the motion estimation unit 42 and the motion compensation unit 44 to perform such functions for intra BC prediction according to the implementations described herein. In either case, for intra block copying, the predictive block may be a block that is deemed to closely match the block to be coded in terms of pixel differences, which may be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics, and identification of the predictive block may include calculation of values at sub-integer pixel positions.
[0033] Whether the predictive block is from the same frame via intra prediction or from 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 to form pixel difference values. The pixel difference values that form the residual video block may include both luma component differences and chroma component differences.
[0034] As described above, the intra-prediction processing unit 46 may intra-predict the current video block as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-block copy prediction performed by the intra BC unit 48. In particular, the intra-prediction processing unit 46 may determine an intra-prediction mode to use to encode the current block. To do so, the intra-prediction processing unit 46 may, for example, encode the current block using various intra-prediction modes in separate coding passes, and the intra-prediction processing unit 46 (or, in some examples, a mode selection unit) may select an appropriate intra-prediction mode to use from the tested intra-prediction modes. The intra-prediction processing unit 46 may provide information indicating the selected intra-prediction mode for the block to the entropy coding unit 56. The entropy coding unit 56 may encode the information indicating the selected intra-prediction mode into the bitstream.
[0035] After prediction processing unit 41 determines a predictive block for the current video block via either inter- or intra-prediction, adder 50 forms 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 processing unit 52. Transform processing unit 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.
[0036] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 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 modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of a matrix containing the quantized transform coefficients. Alternatively, entropy coding unit 56 may perform the scan.
[0037] Following quantization, the entropy coding unit 56 may use, for example, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioned entropy (P The quantized transform coefficients are entropy coded into a video bitstream using IPE (Integrated Picture Enhancement) coding, or another entropy coding method or technique. The coded bitstream may then be transmitted to video decoder 30 or archived in storage device 32 for subsequent transmission to or retrieval from video decoder 30. Entropy coding unit 56 may also entropy code motion vectors and other syntax elements for the current video frame being coded.
[0038] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for generating reference blocks for prediction of 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.
[0039] 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 to predict another video block in a subsequent video frame.
[0040] 3 is a block diagram illustrating an exemplary video decoder 30 according to some implementations of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-prediction processing unit 84, and an intra-BC unit 85. The video decoder 30 may perform a decoding process that is generally the reverse of the encoding process described above for the video encoder 20 in conjunction with FIG. 2. For example, the motion compensation unit 82 may generate prediction data based on a motion vector received from the entropy decoding unit 80, while the intra-prediction unit 84 may generate prediction data based on an intra-prediction mode indicator received from the entropy decoding unit 80.
[0041] In some examples, any unit of video decoder 30 may be tasked with performing an implementation of the present disclosure. Also, in some examples, an implementation of the present disclosure may be divided among one or more of the units of video decoder 30. For example, intra BC unit 85 may perform an implementation of the present disclosure 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.
[0042] Video data memory 79 may store video data, such as an encoded video bitstream, for decoding by other components of video decoder 30. The video data stored in video data memory 79 may be obtained, for example, from storage device 32, from a local video source such as a camera, via wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., 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 may store coded video data for use in decoding video data by video decoder 30. Video data memory 79 and DPB 92, which store reference video data for (e.g., in intra- or inter-predictive coding modes), may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magneto-resistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For purposes of illustration, video data memory 79 and DPB 92 are shown 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.
[0043] During the decoding process, video decoder 30 receives an encoded video bitstream representing video blocks and associated syntax elements of encoded video frames. Video decoder 30 may receive the syntax elements at the video frame level and / or the video block level. 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 prediction processing unit 81.
[0044] If the video frame is coded as an intra-predictively coded (I) frame or for intra-coded predictive blocks of other types of frames, intra-prediction processing unit 84 of prediction processing unit 81 may generate predictive data for the 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.
[0045] When a video frame is coded as an inter-predictive (i.e., B or P) frame, motion compensation unit 82 of prediction processing unit 81 generates one or more predictive blocks for video blocks of the current video frame based on the motion vectors and other syntax elements received from entropy decoding unit 80. Each of the predictive blocks may be generated from one reference frame of the reference frame lists. Video decoder 30 may construct the reference frame lists, List0 and List1, using a default construction technique based on the reference frames stored in DPB 92.
[0046] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 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.
[0047] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for video blocks of the current video frame by parsing the motion vectors and other syntax elements, and then use the prediction information to generate predictive blocks for the current video block being 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 for each inter predictively coded video block of the frame, the frame length, and the frame frame length. The decoder determines an inter-prediction status for each inter-predictive coded video block of the current video frame, as well as other information for decoding the video blocks of the current video frame.
[0048] Similarly, intra BC unit 85 can use some of the received syntax elements, such as flags, to determine that the current video block was predicted using intra BC mode, configuration information about which video blocks of the frame are within the reconstruction domain and should be stored in DPB 92, block vectors for each intra BC predicted video block of the frame, the intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video blocks of the current video frame.
[0049] Motion compensation unit 82 may also perform interpolation using an interpolation filter, such as that used by video encoder 20 during encoding of the video block, to calculate interpolated values for sub-integer pixels of the reference block. In this case, motion compensation unit 82 may determine the interpolation filter used by video encoder 20 from the received syntax element and use the interpolation filter to generate the predictive block.
[0050] Inverse quantization processing unit 86 uses the same quantization parameters calculated by video encoder 20 for each video block of a video frame to inverse quantize the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80 to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct residual blocks in the pixel domain.
[0051] 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 adding the residual block from inverse transform processing unit 88 and 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 to further process the decoded video block. Decoded video blocks in a given frame are 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 on a display device, such as display device 34 of FIG. 1.
[0052] In a typical video coding process, a video sequence typically contains an ordered set of frames or pictures. Each frame may contain three sample arrays, denoted SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other examples, a frame may be monochromatic and therefore contain only one two-dimensional array of luma samples.
[0053] As shown in FIG. 4A, video encoder 20 (or more specifically, partitioning unit 45) generates a coded representation of a frame by first partitioning the frame into a set of coding tree units (CTUs). A video frame may contain an integer number of CTUs consecutively 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 the CTUs are signaled by video encoder 20 in a sequence parameter set such that all CTUs in a video sequence have the same size, which may be one of 128x128, 64x64, 32x32, and 16x16. However, the present application is not necessarily limited to any particular size. Note that, as shown in FIG. 4B, each CTU may comprise one coding tree block (CTB) for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements used to encode the samples of the coding tree block. The syntax elements describe properties of different types of units of coding blocks of pixels, including inter or intra prediction, intra prediction mode, motion vectors, and other parameters, and how the video sequence may be reconstructed at video decoder 30. For monochrome pictures or pictures with three separate color planes, a CTU may comprise 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 N×N block of samples.
[0054] 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 of both, on the coding tree blocks of a CTU to divide the CTU into smaller coding units (CUs). As shown in FIG. 4C , 64×64 CTU 400 is first partitioned into four smaller CUs, each with a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each partitioned into four 16×16 CUs by block size. Two 16×16 CUs 430 and 440 are each further partitioned into four 8×8 CUs by block size. FIG. 4D shows a quad tree data structure illustrating the final result of the partitioning process of CTU 400 as shown in FIG. 4C , where each leaf node of the quad tree corresponds to one CU of a respective size ranging from 32×32 to 8×8. Similar to the CTU shown in FIG. 4B, each CU may have a coding block (CB) of luma samples, two corresponding coding blocks of chroma samples for a frame of the same size, and syntax elements used to encode the samples of the coding block. In a monochrome picture or a picture with three separate color planes, a CU may have a single coding block and syntax elements used to encode the samples of the coding block. Note that the quadtree partitioning shown in FIGS. 4C and 4D is for illustrative purposes only, and a CTU can be divided into CUs to accommodate various local characteristics based on quadtree / ternary / binary tree partitioning. In a multi-type tree structure, a CTU is partitioned by a quadtree structure, and each quadtree leaf CU can be further partitioned by binary and ternary tree structures. As shown in FIG. 4E, there are five partition types: 4-way partitioning, horizontal 2-way partitioning, vertical partitioning, horizontal 3-way partitioning, and vertical 3-way partitioning.
[0055] In some implementations, video encoder 20 may further divide the coding blocks 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 the same prediction, inter or intra, is applied. A prediction unit (PU) of a CU may comprise a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and syntax elements used to predict the prediction block. In monochrome pictures or pictures with three separate color planes, a PU may comprise 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 the luma, Cb, and Cr prediction blocks of each PU of a CU.
[0056] Video encoder 20 may use intra prediction or inter prediction to generate predictive blocks for a PU. If video encoder 20 uses intra prediction to generate 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 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.
[0057] After video encoder 20 generates the predicted luma, Cb, and Cr blocks for one or more PUs of a CU, video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block, such that each sample in the luma residual block of the CU indicates a difference between a luma sample of one of the predicted 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 for the CU, such that each sample in the Cb residual block of the CU indicates a difference between a Cb sample of one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and such that each sample in the Cr residual block of the CU indicates a difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0058] Further, as shown in FIG. 4C , video encoder 20 may use quadtree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A transform unit (TU) of a CU may comprise a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements used to transform the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In monochrome pictures or pictures with three separate color planes, a TU may comprise a single transform block and syntax structures used to transform the samples of the transform block.
[0059] 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.
[0060] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients and provide further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode the syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform context-adaptive binary arithmetic coding (CABAC) on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream including a sequence of bits forming a representation of the encoded frame and associated data, which is either stored in the storage device 32 or transmitted to the destination device 14.
[0061] After receiving the bitstream generated by video encoder 20, video decoder 30 parses 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 constructing a CU 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 corresponding samples of transform blocks of TUs of the current CU. After reconstructing the coding blocks for each CU of the frame, video decoder 30 may reconstruct the frame.
[0062] As mentioned above, video coding primarily uses two modes: intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction) to achieve video compression. Palette-based coding is another coding method adopted by many video coding standards. In palette-based coding, which may be particularly suitable for screen-generated content coding, a video coder (e.g., video encoder 20 or video decoder 30) forms a palette table of colors to represent the video data of a given block. The palette table contains the most dominant (e.g., frequently used) pixel values of the given block. Pixel values that are not frequently represented in the video data of a specified block are either not included in the palette table or are included in the palette table as escape colors.
[0063] Each entry in the palette table contains an index of the corresponding pixel value in the palette table. The palette index for a sample of a block may be coded to indicate which entry from the palette table is used to predict or reconstruct which sample. This palette mode begins with the process of generating a palette predictor for the first block of a picture, slice, tile, or other grouping of video blocks. As described below, palette predictors for subsequent video blocks are typically generated by updating the previously used palette predictor. For purposes of explanation, it is assumed that the palette predictor is defined at the picture level. In other words, although a picture may contain multiple coded blocks, each with its own palette table, there is one palette predictor for the entire picture.
[0064] To reduce the bits required to signal palette entries in a video bitstream, a video decoder can utilize a palette predictor to determine new palette entries for a palette table used to reconstruct a video block. For example, the palette predictor can contain palette entries from a previously used palette table, or can even be initialized with the last used palette table by including all entries from the last used palette table. In some implementations, the palette predictor can contain fewer than all entries from the last used palette table and then incorporate some entries from other previously used palette tables. The palette predictor may have the same size as the palette table used to encode different blocks, or it may be larger or smaller than the palette table 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.
[0065] To generate a palette table for a block of video data from the palette predictor, the video decoder may receive from the encoded video bitstream a one-bit flag for each entry of the palette predictor. The one-bit flag may have a first value (e.g., a binary 1) indicating that the associated entry of the palette predictor is included in the palette table, or a second value (e.g., a binary 0) indicating that the associated entry 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: If the maximum size of the palette table is reached, it may stop receiving more flags.
[0066] In some implementations, some palette table entries may be directly signaled in the coded video bitstream instead of being determined using a palette predictor. For such entries, a video decoder may receive from the coded video bitstream three separate m-bit values indicating the luma pixel value and two chroma components associated with the entry, where m represents the bit depth of the video data. Compared to the multiple m-bit values required for directly signaled palette entries, those palette entries derived from the palette predictor require only a one-bit flag. Thus, signaling some or all 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.
[0067] In many cases, the palette predictor for a block is determined based on the palette table used to encode one or more previously coded blocks. However, when encoding the first coding tree unit in a picture, slice, or tile, the palette table of the previously coded block may not be available. Therefore, it is not possible to generate a palette predictor using entries from a previously used palette table. In such cases, a sequence of palette predictor initializers may be signaled in a sequence parameter set (SPS) and / or a picture parameter set (PPS), which are values used to generate a palette predictor when a previously used palette table is unavailable. An SPS generally refers to a syntactic structure of syntax elements that apply to a series of consecutive coded video pictures, called a coded video sequence (CVS), as determined by the contents 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 apply to one or more individual pictures in a CVS, as determined by syntax elements found in each slice segment header. Therefore, an SPS is generally considered a higher level syntactic structure than a PPS, meaning that the syntax elements contained in an SPS generally change less frequently and apply to a larger portion of the video data compared to the syntax elements contained in a PPS.
[0068] 5 is a table 500 illustrating an example multiple transform selection (MTS) scheme for transforming residuals of inter-coded and intra-coded blocks according to some implementations of this disclosure. For example, during encoding, video encoder 20 performs MTS using transform processing unit 52 of FIG. 2. During decoding, video decoder 30 performs an inverse transform using a corresponding inverse transform method using inverse transform processing unit 88 of FIG. 3.
[0069] The current VVC specification employs the MTS method for transforming residuals in both inter-coded and intra-coded blocks. When MTS is used, during encoding, a video encoder selects one of many transform methods to apply to the residuals of a coded block. For example, a video encoder can apply a DCT2 transform (e.g., MTS disabled), a DCT8 transform, or a DST7 transform to the residuals of a coded block. A group of syntax elements (e.g., MTS_CU_flag, MTS_Hor_flag, MTS_Ver_flag) (also called flags) are used to signal the specific transform method used for a coded block.
[0070] In some embodiments, two syntax elements are specified at the sequence level (e.g., sequence 1) to allow separate MTS for intra-mode and inter-mode. Parameter Set (SPS). When MTS is enabled at the sequence level, another CU-level syntax element (e.g., MTS_CU_flag in Table 500) is further signaled to indicate whether MTS applies to a particular CU.
[0071] In some embodiments, the MTS is used only if several criteria related to characteristics of the coding block are met, including: 1) both the width and height of the coding block are less than or equal to a predetermined value (e.g., 32); 2) the coding block is a luma coding block (e.g., the luma CBF flag == 1 because the MTS is only used in luma residual coding); and 3) both the horizontal and vertical coordinates of the last non-zero coefficient are less than a predetermined value (e.g., 16) (e.g., the last non-zero coefficient is confined to a predetermined top-left region of the transform block). If any of the above criteria are not met, the video encoder does not apply the MTS but rather applies a default transform method, such as a DCT2 transform, to transform the block residual, and the corresponding syntax element is set to indicate that the default transform is used (e.g., MTS_CU_flag == 0 and MTS_Hor_flag and MTS_Ver_flag are not signaled).
[0072] Table 500 shows the syntax element values and the corresponding transform methods used in MTS. When the DCT2 transform is used to transform the block residual, MTS_CU_flag is set to 0, and MTS_Hor_flag and MTS_Ver_flag are not signaled. When MTS_CU_flag is set to 1 (e.g., indicating that DCT8 and / or DST7 are used), two other syntax elements (e.g., MTS_Hor_flag, MTS_Ver_flag) are additionally signaled to indicate the horizontal and vertical transform type. If MTS_Hor_flag==1 or MTS_Ver_flag==1, the respective horizontal or vertical component is transformed using the DST7 method. If MTS_Hor_flag==0 or MTS_Ver_flag==0, the horizontal / vertical component is transformed using the DCT8 method.
[0073] In some embodiments, all MTS transform coefficients are coded with the same 6-bit precision as the DCT2 core transform. Assuming that VVC supports all transform sizes used in HEVC, all transform cores used in HEVC are kept the same as VVC, including 4-point, 8-point, 16-point, and 32-point DCT2 transforms and 4-point DST7 transforms. Meanwhile, other transform cores, including 64-point DCT2, 4-point DCT8, 8-point, 16-point, and 32-point DST7 and DCT8, are additionally supported in the VVC transform design.
[0074] Furthermore, to reduce the amount of computation for large size DST7 or DCT8 transforms, when either the width or height of the block is equal to 32, the transform coefficients (e.g., high frequency transform coefficients) that lie outside the low frequency region (e.g., the top left 16x16 region of the transform block) are set to zero for DST7 and DCT8 transform blocks (e.g., a zero-out operation).
[0075] In some embodiments, transform coefficients of a transform block are coded using non-overlapping coefficient groups (CGs). The CG size is determined based on the size of the transform block. The CGs in the transform block and the transform coefficients in each CG are coded based on one predefined scan order (e.g., diagonal scan order).
[0076] 6 is a block diagram illustrating an example transform block 600 having non-zero transform coefficients, according to some implementations of this disclosure. The transform block 600 includes a first region 602 corresponding to the mesh portion at the top left of the transform block 600 and a second region 604 represented by the dashed portion of the transform block 600. The first region 602 is a predetermined size (e.g., A second region 604 is a region outside of the first region 602 that may or may not include one or more non-zero transform coefficients.
[0077] 5, the video encoder / decoder may use MTS to transform the residual (e.g., luma residual) in both intra-mode and inter-mode (e.g., DCT8 or DST7 transform). Furthermore, the video encoder / decoder uses MTS only if (1) both the width and height of the coding block are less than or equal to a predetermined value (e.g., 32), (2) the coding block is a luma coding block (e.g., luma CBF flag == 1 because MTS applies only to luma residual coding), and (3) both the horizontal and vertical coordinates of the last non-zero coefficient (e.g., the third non-zero coefficient 610) are less than a predetermined value (e.g., 16), i.e., within the first region 602.
[0078] In some embodiments, if the three criteria listed above are met, MTS can be enabled even if there is only one non-zero transform coefficient in a given upper-left region of the transform block (e.g., the first region 602). In other embodiments, the MTS tool is only effective if there are a sufficient number of non-zero transform coefficients in the transform block, because the MTS coding gain comes from the appropriate selection of one non-DCT2 transform that leads to better energy compaction than the DCT2 transform. In this case, additional criteria are used to signal the MTS syntax element.
[0079] In some embodiments, additional criteria include having at least a minimum number of non-zero transform coefficients in the transform block (e.g., MTS_CU_flag is signaled only when the above three criteria are met and when there are at least a minimum number of non-zero transform coefficients in the entire transform block). During decoding, the video decoder only receives and parses the MTS syntax element (e.g., MTS_CU_flag) if the number of non-zero transform coefficients exceeds a predefined threshold. If the minimum number of non-zero transform coefficients is not present, the video decoder sets MTS_CU_flag to 0 and applies an inverse DCT2 transform to the transform block. For example, assuming that in transform block 600 the minimum number of non-zero transform coefficients for enabling MTS is 2, MTS may be enabled for transform block 600 because there are three non-zero coefficients.
[0080] In some embodiments, the MTS syntax element is conditionally signaled based on the scan order index of the last non-zero transform coefficient in a transform block. For example, in FIG. 6, the scan order index of the last non-zero transform coefficient (third non-zero coefficient 610) is N. As a result, a video encoder or decoder does not need to count all non-zero transform coefficients to determine whether the number of non-zero coefficients in a transform block exceeds a predetermined threshold (which may cause a significant increase in computational complexity when analyzing luma residuals). Specifically, the MTS is used for a transform block only if the scan order index of the last non-zero coefficient (i.e., N) exceeds a predetermined threshold (e.g., 3). If the scan order index of the last non-zero transform coefficient is greater than the predetermined threshold, the MTS_CU_flag is signaled to indicate the specific transform used (e.g., according to table 500 of FIG. 5). On the other hand, if the index position of the last non-zero transform coefficient is not greater than the predetermined threshold, the MTS_CU_flag is not signaled and is inferred to be zero (e.g., DCT2 is used). In this approach, only one check is performed per transform block before parsing the MTS syntax elements. Table 1 below shows the syntax tables used for the coding unit and transform unit when this method is applied to the MTS signaling condition with the relevant changes underlined. In Table 1, a Boolean variable MtsLastSigCoeffPosMetThresholdFlag is used to check whether the index position of the last non-zero coefficient is greater than a predefined threshold. The MTS_CU_flag is allowed to be signaled for a given transform block to indicate [Table 1] [Table 2] Table 1: Modified syntax table of coding units and transformation units for MTS signaling
[0081] As mentioned in the description related to FIG. 5, under MTS, transform coefficients (e.g., high-frequency transform coefficients) outside a predetermined top-left region in a transform block (e.g., the top-left 16×16 region, also known as the non-zero region) are forced to zero (e.g., this region is also known as the zero-out region) if either the width or height of the transform block is greater than a predetermined value (e.g., 16). For example, in FIG. 6, the second region 604 may be the zero-out region, and the first region 602 may be the non-zero region. The MTS_CU_flag is signaled only if both the horizontal and vertical coordinates of the last non-zero coefficient (e.g., the third non-zero coefficient 610) are less than a predetermined value (e.g., 16), indicating that the last non-zero coefficient is within the non-zero region. However, due to the fact that transform coefficients are scanned based on a diagonal scan order, such an MTS signaling condition cannot guarantee that all non-zero transform coefficients are always located inside a predetermined top-left region (e.g., although not shown in FIG. 6, one or more non-zero coefficients before the last non-zero coefficient may be located in the second region 604). Therefore, an additional check is required to ensure that all non-zero coefficients are inside a non-zero region (e.g., the first region 602).
[0082] In some embodiments, examples of additional checks include a bitstream conformance constraint such that if there are non-zero coefficients within the MTS zero-out region (e.g., second region 604), the value of the MTS index, i.e., MTS_idx, must be zero (i.e., DCT2 is used by default).
[0083] In some embodiments, depending on whether there are any non-zero coefficients that fall outside the top-left region (e.g., min(TUWidth, 16) x min(TUHeight, 16)), The MTS index is signaled. If affirmative, the MTS index is not signaled and is always inferred as 0. Otherwise, the MTS index is signaled in the bitstream to indicate the transform used.
[0084] Instead of checking each scan position, the determination of whether there is a non-zero coefficient in the zero-out region can be made by checking the CBF at the coding group (CG) level. Specifically, if any CG of the current TB located within the zero-out region has a CBF value equal to 1 (i.e., there is a non-zero coefficient in the CG), the signaling of the MTS index is omitted. Table 2 below shows the modified syntax table of the transform unit when the above-mentioned MTS signaling constraints are applied (compared to the current VVC specification), with the changes related to the proposed constrained MTS signaling underlined. [Table 3] [Table 4] [Table 5] Table 2: Proposed conversion unit syntax table for MTS signaling
[0085] In some embodiments, the transform skip mode can be applied independently to the luma and chroma components by signaling three transform skip flags in the bitstream, one for each component. However, in the current design, applying the transform skip mode to the chroma components is prohibited when the chroma residual of the current TU is coded in JCCR mode. Because transform skip and JCCR are applied at different stages in reconstructing the chroma residual, the two coding tools can be enabled simultaneously. Therefore, another embodiment of the present disclosure proposes to enable the chroma transform skip mode when the chroma residual within a TU is coded in JCCR mode.
[0086] 7 is a flowchart illustrating an example process 700 for a video coder to implement a technique for encoding block residuals using a multiple transform selection (MTS) scheme, according to some implementations of this disclosure. For ease of explanation, process 700 is described as being performed by a video decoder, e.g., video decoder 30 of FIG. 3. During process 700, signaling of the MTS is conditioned on the location of the last non-zero coefficient and the presence of non-zero coefficients in different regions of the transform block.
[0087] As a first step, video decoder 30 receives a bitstream encoding a transform block, the transform block including a non-zero region (e.g., the top-left 16x16 region) and a zero-out region (e.g., the region outside the top-left 16x16 region) (710).
[0088] Next, video decoder 30 checks whether there are any non-zero coefficients in the zero-out region (720).
[0089] Following determination that no non-zero coefficients exist within the zero-out region of the transform block, video decoder 30 determines the scan order index of the last non-zero coefficient of the transform block along the scan direction (e.g., the diagonal scan direction) (730). For example, in Figure 6, the last non-zero coefficient of the transform block (third non-zero coefficient 610) has a scan order index of 3.
[0090] 6, if the predetermined threshold is 2, video decoder 30 receives the value of the MTS index from the bitstream because the last non-zero coefficient, 3, is greater than the predetermined threshold of 2.
[0091] Finally, video decoder 30 applies the respective transform to the transform coefficients of the transform block in both the horizontal and vertical directions based on the value of the MTS index (760). For example, as described in FIG. 5 and related description, if the value of MTS_CU_flag is 0, the video decoder applies an inverse DCT2 transform to the transform block. If the value of MTS_CU_flag is 1, the video decoder further receives additional syntax elements (e.g., MTS_Hor_flag and MTS_Ver_flag) to selectively apply an inverse DST7 or DCT8 to the transform block.
[0092] In some embodiments, following a determination that the scan order index of the last non-zero coefficient is less than or equal to a predetermined threshold, video decoder 30 applies a default transform to the transform block (eg, DCT-2).
[0093] In one embodiment, video decoder 30 applies each of the transforms to the transform block based on the value of the MTS index according to a determination that the MTS index has a first value (e.g., 1) received from the bitstream, applies coefficients of the transform block in the horizontal direction based on the value of the MTS horizontal flag (e.g., MTS_Hor_flag) and the value of the MTS vertical flag (e.g., MTS_Ver_flag) (e.g., DCT-7 if MTS_Hor_flag==0, DCT-8 if MTS_Ver_flag==1), and transforms the transform block using a default transform (e.g., DCT-2) in both the horizontal and vertical directions according to a determination that the MTS index has a second value (e.g., 0).
[0094] In some embodiments, video decoder 30 checks for non-zero coefficients in the zeroed-out region by checking the coded block flags (CBFs) of the luma coefficients in the zeroed-out region and determining that there are no non-zero coefficients in the zeroed-out region only if the CBFs of all luma coefficients in the zeroed-out region are zero. For example, if the CBF of one luma coefficient in the zeroed-out region is 1, there is at least one non-zero coefficient in the zeroed-out region, and no MTS index is signaled.
[0095] In some embodiments, video decoder 30 checks whether there is a non-zero coefficient within the zero-out region by checking the horizontal and vertical coordinates of the last non-zero coefficient and determining that there is at least one non-zero coefficient within the zero-out region when either the horizontal or vertical coordinate of the last non-zero coefficient is within the zero-out region. For example, if either the horizontal or vertical coordinate of the last non-zero coefficient is within the zero-out region, there is at least one non-zero coefficient within the zero-out region.
[0096] In some embodiments, the chroma residual of the transform block is coded in joint chroma residual coding (JCCR) mode, and chroma transform skip mode is enabled for the transform block.
[0097] In some embodiments, the non-zero region is the top left 16x16 region of the transform block.
[0098] In some embodiments, the scan order is a diagonal scan order.
[0099] As mentioned above, the motivation for using MTS is to achieve better energy compaction of residual samples using other core transforms in the DCT / DST transform. Residuals resulting from different prediction modes may exhibit different characteristics. In some embodiments, it may not be beneficial to use MTS for all prediction modes. For example, there is usually more correlation between samples in the temporal domain than in the spatial domain, and therefore inter-predicted samples often have better prediction efficiency than intra-predicted samples. In other words, the magnitude of the residual of an inter-predicted block is often smaller than that of an intra-predicted block. In this case, the MTS mode may be disabled for inter-coding a block. Specifically, when the current coding block is intra-coded, the syntax mts_idx is parsed to determine whether a non-DCT2 transform is applied to the current coding block. Otherwise, when the current coding block is inter-coded, the syntax mts_idx is not parsed and is always inferred to be 0, i.e., only a DCT2 transform is applicable. The corresponding syntax table with the proposed method is specified as follows: [Table 6] Table 3: Additional proposed conversion unit syntax table for MTS signaling
[0100] FIG. 8 is a block diagram illustrating an example context-adaptive binary arithmetic coding (CABAC) engine, according to some implementations of this disclosure.
[0101] 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, with several innovations and modifications to adapt it to the needs of video coding standards. For example, CABAC encodes binary symbols, which keeps complexity low and enables probability modeling for the more frequently used bits of any symbol. The probability model is adaptively selected based on local context, allowing for better modeling of probabilities since coding modes are usually well correlated locally. Finally, CABAC achieves multiplication-free range partitioning by using quantized probability ranges and probability states.
[0102] CABAC has multiple probability modes for different contexts. First, all non-binary symbols are converted to binary. Then, for each bin (or bit), the coder chooses which probability model to use and then optimizes the probability estimate using information from nearby elements. Finally, arithmetic coding is applied to compress the data.
[0103] Context modeling provides estimates of the conditional probabilities of the coded symbols. With the aid of an appropriate context model, it is possible to exploit a given inter-symbol redundancy by switching between different probability models according to the already coded symbols in the neighborhood of the current symbol to be coded. The coding of a data symbol includes the following steps:
[0104] Binarization: CABAC uses binary arithmetic coding, which means 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 code, before arithmetic coding. This process is similar to converting data symbols into variable-length codes, but the binary code is further coded (by an arithmetic coder) before transmission. The stages are repeated for each bin (or "bit") of the binarized symbol.
[0105] 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 a selection of available models depending on the statistics of recently coded data symbols. The context model stores the probability that each bin is a "1" or a "0."
[0106] Arithmetic coding: The arithmetic coder encodes each bin according to a selected probability model. Note that each bin has only two subranges (corresponding to "0" and "1").
[0107] Probability Update: The selected context model is updated based on the actual encoding value (e.g., if the bin value was "1", the frequency count of "1" is increased).
[0108] By decomposing each non-binary syntax element value into a sequence of bins, further processing of each bin value in CABAC depends on an associated coding mode decision, which can be selected as either normal mode or bypass mode. The latter is selected for bins that are assumed to be uniformly distributed, resulting in the entire normal binary arithmetic encoding (and decoding) process being simply bypassed. In normal coding mode, each bin value is encoded using a normal binary arithmetic coding engine, and the associated probability model is either determined by a fixed selection based on the syntax element type and the bin position or bin index (binIdx) in the binary representation of the syntax element, or adaptively selected from two or more probability models depending on relevant side information (e.g., spatial neighborhood, component, depth, or size of the CU / PU / TU, or position within the TU). The selection of the probability model is called context modeling. As a key design decision, the latter case is generally applied only to the most frequently observed bins, while other, usually infrequently observed bins are processed using a joint, typically zero-order, probability model. In this way, CABAC allows selective adaptive probability modeling at the sub-symbol level, thus providing an efficient means for exploiting inter-symbol redundancy with significantly reduced overall modeling or training costs. Note that for both the fixed and adaptive cases, in principle, switching from one probability model to another can occur between any two consecutive regular coding bins. In general, designing a context model in CABAC is an unnecessary model. It reflects the objective of finding a good compromise between the conflicting objectives of avoiding delving cost overhead and exploiting statistical dependence to a large extent.
[0109] The parameters of the probability models in CABAC are adaptive, meaning that adaptation of the model probabilities to the statistical variations of the bin source is performed on a bin-by-bin basis in both the encoder and decoder in a backward-adaptive and synchronous manner; this process is called probability estimation. To this end, each probability model in CABAC can take one of 126 different states with an associated model probability value p ranging in the interval [0:01875;0:98125]. Two parameters of each probability model are stored as 7-bit entries in the context memory: 6 bits for each of the 63 probability states representing the model probability pLPS of the least probable symbol (LPS), and 1 bit for nMPS, the value of the most probable symbol (MPS).
[0110] 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 via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage 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, according to a communication protocol. In this manner, computer-readable media generally can correspond to (1) non-transitory tangible computer-readable storage media or (2) communication media such as a signal or carrier wave. Data storage media may be any available medium accessible by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementations described herein. A computer program product may include computer-readable media.
[0111] The terms used in the description of implementations herein are intended to describe particular implementations only and are not intended to limit the scope of the claims. As used in the description of embodiments and the appended claims, singular forms such as "a," "an," and "an" are intended to include the plural forms as well, unless the context clearly dictates otherwise. Additionally, the term "and / or," as used herein, will be understood to refer to and encompass any and all possible combinations of one or more of the associated listed items. It will be further understood that the term "comprises," "includes," and the like, when used herein, specifies the presence of stated features, elements, and / or components, but does not exclude the presence or addition of one or more other features, elements, components, and / or groups thereof.
[0112] It is also understood that terms such as "first," "second," etc. may be used herein to describe various elements, but these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first electrode can be referred to as a second electrode, and a second electrode can be referred to as a first electrode, without departing from the scope of the present invention. Although a first electrode and a second electrode are both electrodes, they are not the same electrode.
[0113] 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 become apparent to those skilled in the art having the benefit of the teachings presented in the foregoing descriptions and the associated drawings. The present embodiments have been chosen and described to best explain the principles and practical applications of the invention and to enable others skilled in the art to understand the invention for various implementations and to best utilize the underlying principles and various implementations, with various modifications suited to the particular uses contemplated. Accordingly, the appended claims should be construed as limiting the scope of the invention to the particular embodiments disclosed. It should be understood that the present invention should not be limited to the examples, and that modifications and other embodiments are intended to be included within the scope of the appended claims.
[0114] [Related Applications] This application claims priority to U.S. Provisional Patent Application No. 62 / 938,890, filed November 21, 2019, entitled "Method and Apparatus for Transform and Coefficient Signaling," and U.S. Provisional Patent Application No. 62 / 959,325, filed January 10, 2020, entitled "Method and Apparatus for Transform and Coefficient Signaling," both of which are incorporated by reference in their entireties.
Claims
1. determining whether a coding group of the transform block is within a zero-out region, and determining whether the coding group has non-zero coefficients; the transform block includes a non-zero region and the zero-out region; In response to determining that no coding group of the transform block within the zero-out region has non-zero coefficients, applying respective inverse transforms in both the horizontal and vertical directions to transform the coefficients of the transform block; encoding a multiple transform selection (MTS) index value that identifies each of said inverse transforms into a bitstream; Determining whether the coding group of the transform block is within the zero-out region includes: determining whether the horizontal coordinate of the position of the coding group within the transform block is greater than 3; and / or determining whether the vertical coordinate of the position of the coding group within the transform block is greater than 3; Including, Video coding methods.
2. According to a determination that a coding group of the transform block located within the zero-out region has non-zero coefficients, applying a predetermined default inverse transform to transform coefficients of the transform block in both the horizontal and vertical directions; The video encoding method of claim 1 , further comprising:
3. the predetermined default inverse transform is an inverse DCT-2 transform, and each of the inverse transforms includes an inverse DCT-7 transform and an inverse DCT-8 transform; 3. The video encoding method of claim 2.
4. the chroma residual of the transform block is coded in a joint chroma residual coding (JCCR) mode; Transform skip mode is enabled for the corresponding chroma transform block; 2. The video encoding method of claim 1.
5. The video encoding method of claim 1 , wherein the non-zero region is a top-left 16×16 region of the transform block.
6. The video encoding method of claim 1 , wherein a scan order of coefficients of the transform block is a diagonal scan order.
7. 1. An electronic device comprising: one or more processing units; a memory coupled to one or more of said processing units; a plurality of programs stored in the memory, which, when executed by one or more of the processing units, cause the electronic device to perform the video encoding method of any one of claims 1 to 6; Including, electronic equipment.
8. A non-transitory computer-readable storage medium storing a plurality of programs executed by an electronic device having one or more processing units, the plurality of programs, when executed by one or more of the processing units, causing the electronic device to perform the video encoding method of any one of claims 1 to 6.
9. Generating a bitstream using the video coding method of any one of claims 1 to 6, storing the bitstream on a non-transitory computer-readable storage medium; Bitstream storage method.
10. A program executed by an electronic device having one or more processing units, the program causing the electronic device to perform the video encoding method of any one of claims 1 to 6 when executed by one or more of the processing units.
Citation Information
Patent Citations
Image coding method based on transform, and device therefor
WO2021096172A1