CN115004706A - Methods and apparatus relating to transform and coefficient signaling - Google Patents

Methods and apparatus relating to transform and coefficient signaling Download PDF

Info

Publication number
CN115004706A
CN115004706A CN202180011530.4A CN202180011530A CN115004706A CN 115004706 A CN115004706 A CN 115004706A CN 202180011530 A CN202180011530 A CN 202180011530A CN 115004706 A CN115004706 A CN 115004706A
Authority
CN
China
Prior art keywords
transform
block
video
lfnst
coding block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202180011530.4A
Other languages
Chinese (zh)
Other versions
CN115004706B (en
Inventor
修晓宇
马宗全
陈漪纹
王祥林
朱弘正
于冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Publication of CN115004706A publication Critical patent/CN115004706A/en
Application granted granted Critical
Publication of CN115004706B publication Critical patent/CN115004706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An electronic device performs a method of decoding video data. The method comprises the following steps: receiving a control flag, wherein the control flag indicates whether luma samples and chroma samples of a coding block in video data are partitioned based on a single tree or two disjoint trees; receiving a bit stream corresponding to the coding block; the determined luminance and chrominance samples are split by a single tree: determining a scanning order index of a last non-zero transform coefficient for a luma sample of a coding block; the scan order index according to the determined last non-zero transform coefficient satisfies a predefined criterion: receiving a low frequency indivisible transform (LFNST) index from a bitstream; and applying an inverse LFNST transform to transform coefficients of luma samples of the coding block based on the LFNST index; the determined luminance and chrominance samples are partitioned by two separation trees: respectively determining the scanning sequence index of the last non-zero transformation coefficient aiming at the brightness sample point and the chroma sample point of the coding block; according to a respective one of the determined scan order indices of the last non-zero transform coefficient satisfying a predefined criterion: receiving a corresponding LFNST index from a bitstream; and applying a respective inverse LFNST transform to transform coefficients of corresponding sample points of the coding block based on the corresponding LFNST indices.

Description

Method and apparatus relating to transform and coefficient signaling
RELATED APPLICATIONS
The present application claims priority from united states provisional patent application No. 62/966,871 entitled "METHODS AND APPARATUS for transformation AND COEFFICIENT SIGNALING," filed 28.01.2020, which is incorporated herein by reference in its entirety.
Technical Field
The present application relates generally to video coding and compression and, more particularly, to methods and apparatus related to improving and simplifying existing designs of transform and coefficient coding methods in the general video coding (VVC) standard.
Background
Various electronic devices, such as digital televisions, notebook or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, and the like, support digital video. Electronic devices transmit, receive, encode, decode, and/or store digital video data by implementing video compression/decompression standards as defined by the MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, Advanced Video Codec (AVC), High Efficiency Video Codec (HEVC), and general video codec (VVC) standards. Video compression typically includes performing spatial (intra) prediction and/or temporal (inter) prediction to reduce or remove redundancy inherent in the video data. For block-based video coding, a video frame is partitioned into one or more slices, each slice having a plurality of video blocks, which may also be referred to as Coding Tree Units (CTUs). Each CTU may contain one Coding Unit (CU) or be recursively split into smaller CUs until a predefined minimum CU size is reached. Each CU (also referred to as a leaf CU) contains one or more Transform Units (TUs) and each CU also contains one or more Prediction Units (PUs). Each CU may be coded in intra, inter, or IBC mode. Video blocks in an intra-coded (I) slice of a video frame are encoded using spatial prediction with respect to reference samples in neighboring blocks within the same video frame. Video blocks in an inter-coded (P or B) slice 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.
A prediction block for a current video block to be coded is derived based on spatial prediction or temporal prediction of a reference block (e.g., a neighboring block) that has been previously coded. The process of finding the reference block may be accomplished by a block matching algorithm. Residual data representing pixel differences between the current block to be coded and the prediction block is called a residual block or prediction error. The inter-coded block is encoded according to the residual block and a motion vector pointing to a reference block forming a prediction block in a reference frame. The process of determining motion vectors is commonly referred to as motion estimation. And encoding the intra-coded block according to the intra-frame prediction mode and the residual block. For further compression, the residual block is transformed from the pixel domain to a transform domain (e.g., frequency domain), resulting in residual transform coefficients, which may then be quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, may be scanned to generate one-dimensional vectors of transform coefficients, and then entropy encoded into a video bitstream to achieve even greater compression.
The encoded video bitstream is then saved in a computer readable storage medium (e.g., flash memory) for access by another electronic device having digital video capabilities or for direct transmission to the electronic device, either wired or wirelessly. The electronic device then performs video decompression (which is the inverse of the video compression described above), e.g., by parsing the encoded video bitstream to obtain syntax elements from the bitstream and reconstructing the digital video data from the encoded video bitstream to its original format based at least in part on the syntax elements obtained from the bitstream, and the electronic device presents the reconstructed digital video data on a display of the electronic device.
As the digital video quality changes from high definition to 4K × 2K or even 8K × 4K, the amount of video data to be encoded/decoded grows exponentially. It is a long-standing challenge how to encode/decode video data more efficiently while maintaining the image quality of the decoded video data.
Disclosure of Invention
The present application describes embodiments relating to video data encoding and decoding, and more particularly, to methods and apparatus relating to existing designs for improving and simplifying transform and coefficient coding methods.
According to a first aspect of the application, a method of decoding video data is performed at a computing device, and the method comprises the steps of: receiving a control flag indicating whether luma samples and chroma samples of a coding block in the video data are partitioned based on a single tree or two disjoint trees; receiving a bit stream corresponding to the coding block; the determined luminance and chrominance samples are split by a single tree: determining a scan order index for a last non-zero transform coefficient of the luma samples of the coding block; according to the determined scan order index of the last non-zero transform coefficient satisfying a predefined criterion: receiving a low frequency non-differentiable transform (LFNST) index from the bitstream; and applying an inverse LFNST transform to transform coefficients of the luma samples of the coding block based on the LFNST index; segmenting by two separation trees according to the determined luminance and chrominance samples: determining a scanning order index for the last non-zero transform coefficient of the luma samples and the chroma samples of the encoded block, respectively; according to a respective one of the determined scan order indices of the last non-zero transform coefficient satisfying the predefined criterion: receiving a corresponding LFNST index from the bitstream; and applying a respective inverse LFNST transform to transform coefficients of corresponding sample points of the coding block based on the corresponding LFNST index.
According to a second aspect of the application, an electronic device comprises one or more processing units, a memory, and a plurality of programs stored in the memory. The program, when executed by one or more processing units, causes the electronic device to perform the method of decoding video data as described above.
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 program, when executed by one or more processing units, causes the electronic device to perform the method of decoding video data as described above.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification, illustrate the embodiments described and together with the description serve to explain the principles. Like reference numerals designate corresponding parts.
Fig. 1 is a block diagram illustrating an exemplary video encoding and decoding system according to some embodiments of the present disclosure.
Fig. 2 is a block diagram illustrating an exemplary video encoder, in accordance with some embodiments of the present disclosure.
Fig. 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.
Fig. 4A-4E are block diagrams illustrating how a frame is recursively partitioned into multiple video blocks of different sizes and shapes according to some embodiments of the disclosure.
Fig. 5 is a block diagram illustrating an example low frequency undivided transform (LFNST) process, where LFNST is a quadratic transform used to compress the energy of transform coefficients of an intra-coded block after a first transform, in accordance with some embodiments of the present disclosure.
Fig. 6 is a block diagram illustrating an example transform block having non-zero transform coefficients, according to some embodiments of the present disclosure.
Fig. 7 is a flow diagram illustrating an exemplary process by which a video codec implements a technique for conditionally signaling LFNST based on different components of a transform block, according to some embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the present embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to provide an understanding of the subject matter presented herein. It will be apparent, however, to one 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 one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
Fig. 1 is a block diagram illustrating an example system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. As shown in fig. 1, system 10 includes a source device 12, source device 12 generating and encoding video data to be later decoded by a target device 14. Source device 12 and target device 14 may comprise any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, electronic game machines, video streaming devices, and the like. In some embodiments, source device 12 and target device 14 are equipped with wireless communication capabilities.
In some embodiments, target 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 include a communication medium that enables source device 12 to transmit encoded video data directly to target device 14 in real-time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the target device 14. The communication medium may include any wireless or wired communication medium such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the internet). The communication medium may include a router, switch, base station, or any other device that may facilitate communication from source device 12 to target device 14.
In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. Subsequently, the encoded video data in storage device 32 may be accessed by target 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 discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data. In another example, storage device 32 may correspond to a file server or another intermediate storage device that may retain encoded video data generated by source device 12. The target device 14 may access the stored video data from the 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 the target device 14. Exemplary file servers include web servers (e.g., for a website), FTP servers, Network Attached Storage (NAS) devices, or local disk drives. The target device 14 may access the encoded video data through any standard data connection suitable for accessing encoded video data stored on a file server, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both wireless and wired connections. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both a streaming and a download transmission.
As shown in fig. 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 the following or a combination of such sources: 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. As one example, if video source 18 is a video camera of a security monitoring system, source device 12 and destination device 14 may form a camera phone or video phone. However, embodiments described herein are generally applicable to video codecs, and may be applied to wireless and/or wired applications.
Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and/or playback. The output interface 22 may further include a modem and/or a transmitter.
The target 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. 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 included within encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.
In some embodiments, the target device 14 may include a display device 34, and the display device 34 may be an integrated display device and an external display device configured to communicate with the target device 14. Display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device.
Video encoder 20 and video decoder 30 may operate according to a proprietary standard or an industry standard, such as VVC, HEVC, MPEG-4, Part 10, Advanced Video Coding (AVC), or an extension of such standards. It should be understood that the present application is not limited to a particular video encoding/decoding standard and is applicable to other video encoding/decoding standards. It is generally recognized that video encoder 20 of source device 12 may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that video decoder 30 of target device 14 may be configured to decode video data in accordance with any of these current or future standards.
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 combinations thereof. When implemented in part in software, the electronic device may store instructions for the software in 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. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in the respective device.
Fig. 2 is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. Video encoder 20 may perform intra-prediction encoding and inter-prediction encoding of the intermediate video blocks within the video frame. Intra-prediction coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence.
As shown in fig. 2, video encoder 20 includes a video data memory 40, a prediction processing unit 41, a Decoded Picture Buffer (DPB)64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56. Prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra prediction processing unit 46, and an intra Block Copy (BC) unit 48. In some embodiments, video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A deblocking filter (not shown) may be located between adder 62 and DPB 64 to filter block boundaries to remove blockiness artifacts from the reconstructed video. In addition to a deblocking filter, a loop filter (not shown) may be used to filter the output of adder 62. Video encoder 20 may take the form of fixed or programmable hardware units, or may be dispersed among one or more of the illustrated fixed or programmable hardware units.
Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data storage 40 may be obtained, for example, from video source 18. DPB 64 is a buffer that stores reference video data for use by video encoder 20 in encoding video data (e.g., in intra or inter prediction encoding modes). Video data memory 40 and DPB 64 may be formed from 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 respect to those components.
As shown in fig. 2, upon receiving the video data, a partition unit 45 within prediction processing unit 41 partitions the video data into video blocks. This partitioning may also include partitioning the video frame into slices, tiles (tiles), or other larger Coding Units (CUs) according to a predefined splitting structure, such as a quadtree structure, associated with the video data. A video frame may be divided into a plurality of video blocks (or a set of video blocks referred to as partitions). Prediction processing unit 41 may select one of a plurality of possible prediction encoding modes, such as one of one or more inter-prediction encoding modes of a plurality of intra-prediction encoding modes, for the current video block based on the error results (e.g., the codec rate and the distortion level). Prediction processing unit 41 may provide the resulting intra-predicted or inter-predicted encoded blocks to adder 50 to generate a residual block, and to adder 62 to reconstruct the encoded block for subsequent 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 encoding unit 56.
To select a suitable intra-prediction encoding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction encoding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 perform inter-prediction encoding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate encoding mode for each block of video data.
In some implementations, motion estimation unit 42 determines the inter-prediction mode for the current video frame by generating motion vectors according to predetermined patterns within the sequence of video frames, the motion vectors indicating the displacement of Prediction Units (PUs) of video blocks within the current video frame relative to prediction blocks within the reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors that estimate motion for video blocks. For example, a motion vector may indicate a displacement of a PU of a video block within a current video frame or picture relative to a prediction block (or other coding unit) within a reference frame that is related to a current block (or other coding unit) being encoded within the current frame. The predetermined pattern may designate video frames in the sequence as P-frames or B-frames. Intra BC unit 48 may determine vectors (e.g., block vectors) for intra BC encoding in a similar manner as the motion vectors determined by motion estimation unit 42 for inter prediction, or may determine block vectors using motion estimation unit 42.
In terms of pixel differences, which may be determined by Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), or other difference metric, a prediction block is a block of the reference frame that is considered to closely match a PU of the video block to be encoded. In some implementations, video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in DPB 64. For example, video encoder 20 may interpolate values for a quarter-pixel position, an eighth-pixel position, or other fractional-pixel positions of the reference frame. Thus, motion estimation unit 42 may perform a motion search with respect to the full pixel position and the fractional pixel position and output a motion vector with fractional pixel precision.
Motion estimation unit 42 calculates motion vectors for PUs of video blocks in inter-prediction coded frames by: the location of the PU is compared to locations of prediction blocks of reference frames selected from a first reference frame list (list 0) or a second reference frame list (list 1), each of which identifies one or more reference frames stored in 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.
The motion compensation performed by motion compensation unit 44 may involve extracting or generating a prediction 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 prediction block to which the motion vector points in one of the reference frame lists, retrieve the prediction block from DPB 64, and forward the prediction block to adder 50. Adder 50 then forms a residual video block of pixel difference values by subtracting the pixel values of the prediction block provided by motion compensation unit 44 from the pixel values of the current video block being encoded. The pixel difference values forming the residual video block may comprise a luminance difference component or a chrominance difference component 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 that define motion vectors used to identify the prediction blocks, any flags indicating prediction modes, 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 illustrated separately for conceptual purposes.
In some embodiments, intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in connection with motion estimation unit 42 and motion compensation unit 44, but in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. In particular, intra BC unit 48 may determine the intra prediction mode to be used for encoding the current block. In some examples, intra BC unit 48 may encode current blocks using various intra prediction modes, e.g., during separate encoding passes, and test their performance through rate-distortion analysis. Next, intra BC unit 48 may select an appropriate intra prediction mode among the various tested intra prediction modes to use and generate an intra mode indicator accordingly. For example, intra BC unit 48 may calculate rate-distortion values for various tested intra-prediction modes using rate-distortion analysis, and select the intra-prediction mode having the best rate-distortion characteristics among the tested modes to use as the appropriate intra-prediction mode. Rate-distortion analysis generally determines the amount of distortion (or error) between an encoded block and the original, unencoded block that was encoded to generate the encoded block, as well as the bit rate (i.e., number of bits) used to generate the encoded block. Intra BC unit 48 may calculate ratios from the distortion and rates for various encoded blocks to determine which intra prediction mode exhibits the best rate-distortion value for the block.
In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction according to embodiments described herein. In either case, for intra block copy, the prediction block may be a block that is considered to closely match the 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 metric, and the identification of the prediction block may include calculating values for sub-integer pixel locations.
Whether the prediction block is from the same frame according to intra prediction or from a different frame according to inter prediction, video encoder 20 may form a residual video block by subtracting pixel values of the prediction block from pixel values of the current video block being encoded to form pixel difference values. The pixel difference values forming the residual video block may include both luminance component differences and chrominance component differences.
As an alternative to inter prediction performed by motion estimation unit 42 and motion compensation unit 44 or intra block copy prediction performed by intra BC unit 48 as described above, intra prediction processing unit 46 may intra predict the current video block. In particular, intra-prediction processing unit 46 may determine an intra-prediction mode for encoding the current block. To this end, the intra prediction processing unit 46 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and the intra prediction processing unit 46 (or in some examples, a mode selection unit) may select an appropriate intra prediction mode from the tested intra prediction modes to use. Intra-prediction processing unit 46 may provide information to entropy encoding unit 56 indicating the intra-prediction mode selected for the block. Entropy encoding unit 56 may encode information indicating the selected intra-prediction mode into a bitstream.
After prediction processing unit 41 determines a prediction block for the current video block via inter prediction or intra prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more Transform Units (TUs) and provided to transform processing unit 52. The transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a Discrete Cosine Transform (DCT) or a conceptually similar transform.
Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The quantization level may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of a matrix including quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform scanning.
After quantization, entropy encoding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, a context-adaptive variable length codec (CAVLC), a context-adaptive binary arithmetic codec (CABAC), a syntax-based context-adaptive binary arithmetic codec (SBAC), a Probability Interval Partition Entropy (PIPE) codec, or another entropy codec method or technique. The encoded bitstream may then be transmitted to video decoder 30, or archived in storage device 32 for later transmission to video decoder 30 or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode the motion vectors and other syntax elements for the current video frame being encoded.
Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transforms, respectively, to reconstruct residual video blocks in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate motion compensated prediction blocks from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction blocks to calculate sub-integer pixel values for use in motion estimation.
The adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by the motion compensation unit 44 to generate a reference block for storage in the DPB 64. The reference block may then be used by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 as a prediction block to inter-predict another video block in a subsequent video frame.
Fig. 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. Prediction processing unit 81 further includes a motion compensation unit 82, an intra prediction processing unit 84, and an intra BC unit 85. Video decoder 30 may perform a decoding process that is substantially reciprocal to the encoding process described above with respect to video encoder 20 in connection with fig. 2. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, while intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.
In some examples, the units of video decoder 30 may be tasked to perform embodiments of the present application. Furthermore, in some examples, embodiments of the present disclosure may be dispersed in one or more of the plurality of 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 functions of intra BC unit 85 may be performed by other components of prediction processing unit 81 (such as motion compensation unit 82).
Video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of video decoder 30. The video data stored in video data storage 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 the 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 encoded video data from an encoded video bitstream. Decoded Picture Buffer (DPB)92 of video decoder 30 stores reference video data for use by video decoder 30 in decoding the video data (e.g., in intra-or inter-prediction coding modes). Video data memory 79 and DPB 92 may be formed from any of a variety of memory devices, such as Dynamic Random Access Memory (DRAM) (including synchronous DRAM (sdram)), magnetoresistive ram (mram), resistive ram (rram), or other types of memory devices. For illustrative purposes, video data memory 79 and DPB 92 are depicted in fig. 3 as two different components of video decoder 30. 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 off-chip with respect to those components.
During the decoding process, video decoder 30 receives an encoded video bitstream representing video blocks and associated syntax elements of an encoded video frame. Video decoder 30 may receive 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. The entropy decoding unit 80 then forwards the motion vectors and other syntax elements to the prediction processing unit 81.
When a video frame is encoded as an intra-prediction encoded (I) frame or as an intra-coded prediction block for use in other types of frames, intra-prediction processing unit 84 of prediction processing unit 81 may generate prediction data for a video block of the current video frame based on the signaled intra-prediction mode and reference data from previously decoded blocks of the current frame.
When a video frame is encoded as an inter-prediction encoded (i.e., B or P) frame, motion compensation unit 82 of prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vectors and other syntax elements received from entropy decoding unit 80. Each of the prediction blocks may be generated from a reference frame within one of the reference frame lists. Video decoder 30 may use a default construction technique to construct reference frame lists, list 0 and list 1, based on the reference frames stored in DPB 92.
In some examples, when encoding and decoding a video block according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vectors and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstruction region of the same picture as the current video block defined by video encoder 20.
Motion compensation unit 82 and/or intra BC unit 85 determine prediction information for the video block of the current video frame by parsing the motion vectors and other syntax elements and then use the prediction information to generate a prediction block for the current video block being decoded. For example, motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra-prediction or inter-prediction) for coding a video block of the video frame, an inter-prediction frame type (e.g., B or P), construction information for one or more of a list of reference frames for the frame, a motion vector for each inter-prediction encoded video block of the frame, an inter-prediction state for each inter-prediction coded video block of the frame, and other information for decoding a video block in the current video frame.
Similarly, some of the received syntax elements, such as flags, may be used by intra BC unit 85 to determine that the current video block is predicted using an intra BC mode, the building information of which video blocks of the frame are within the reconstruction region and should be stored in DPB 92, the block vector 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 used to decode the video blocks in the current video frame.
Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of video blocks to calculate interpolation for sub-integer pixels of the reference block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use these interpolation filters to generate the prediction blocks.
Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80 using the same quantization parameter calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients in order to reconstruct the residual block in the pixel domain.
After motion compensation unit 82 or intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, adder 90 reconstructs the decoded video block for the current video block by adding the residual block from inverse transform processing unit 88 to the corresponding prediction block generated by motion compensation unit 82 and intra BC unit 85. A loop filter (not shown) may be located between adder 90 and DPB 92 to further process the decoded video block. The decoded video blocks in a given frame are then stored in DPB 92, and DPB 92 stores reference frames for subsequent motion compensation of subsequent video blocks. DPB 92, or a memory device separate from DPB 92, may also store decoded video for later presentation on a display device (e.g., display device 34 of fig. 1).
In a typical video codec, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three arrays of samples, denoted SL, SCb, and SCr. SL is a two-dimensional array of brightness samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other cases, the frame may be monochromatic, and thus include only one two-dimensional array of luminance samples.
As shown in fig. 4A, video encoder 20 (or, more specifically, segmentation unit 45) generates an encoded representation of a frame by first segmenting the frame into a set of Coding Tree Units (CTUs). A video frame may include an integer number of CTUs ordered sequentially from left to right and top to bottom in raster scan order. 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 of one of 128 × 128, 64 × 64, 32 × 32, and 16 × 16. It should be noted, however, that the present application is not necessarily limited to a particular size. As shown in fig. 4B, each CTU may include one Coding Tree Block (CTB) of luma samples, two corresponding coding tree blocks of chroma samples, and syntax elements for coding samples of the coding tree blocks. The syntax elements describe the properties of the different types of units that encode the pixel blocks and how the video sequence may be reconstructed at video decoder 30, including inter or intra prediction, intra prediction modes, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may comprise a single coding tree block and syntax elements for coding samples of the coding tree block. The coding tree block may be an N × N block of samples.
To achieve better performance, video encoder 20 may recursively perform tree partitioning, e.g., binary tree partitioning, ternary tree partitioning, quaternary tree partitioning, or a combination of both, on the coding tree blocks of the CTUs and partition the CTUs into smaller Coding Units (CUs). As depicted in fig. 4C, the 64 × 64CTU 400 is first divided into four smaller CUs, each having a block size of 32 × 32. Of the four smaller CUs, CU 410 and CU 420 are divided into four CUs with block sizes of 16 × 16, respectively. The two 16 × 16 CUs 430 and the CU 440 are further divided into four CUs having block sizes of 8 × 8, respectively. Fig. 4D depicts a quadtree data structure showing the final result of the segmentation process of the CTU 400 as depicted in fig. 4C, each leaf node of the quadtree corresponding to one CU of various sizes ranging from 32 x 32 to 8 x 8. Similar to the CTU depicted in fig. 4B, each CU may include a Coded Block (CB) of luma samples and two corresponding coded blocks of chroma samples of the same size frame, and syntax elements for coding the samples of the coded blocks. In a monochrome picture or a picture with three separate color planes, a CU may comprise a single coding block and syntax structures for coding the samples of the coding block. It should be noted that the quadtree partitioning depicted in fig. 4C and 4D is for illustrative purposes only, and one CTU may be split into CUs based on quadtree/ternary tree/binary tree partitioning to adapt to changing local characteristics. In a multi-type tree structure, one 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 segmentation types, i.e., quad segmentation, horizontal binary segmentation, vertical binary segmentation, horizontal ternary segmentation, and vertical ternary segmentation.
In some implementations, video encoder 20 may further partition the coding block of the CU into one or more mxn Prediction Blocks (PBs). A prediction block is a block of rectangular (square or non-square) samples to which the same prediction (inter or intra) is applied. A Prediction Unit (PU) of a CU may include a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and syntax elements used to predict the prediction blocks. In a monochrome picture or a picture with three separate color planes, a PU may include a single prediction block and syntax structures used to predict the prediction block. Video encoder 20 may generate predicted luma, predicted Cb, and predicted Cr blocks for the luma, Cb, and Cr predicted blocks for each PU of the CU.
Video encoder 20 may generate the prediction block for the PU using intra prediction or inter prediction. If video encoder 20 uses intra-prediction to generate the prediction block for the PU, video encoder 20 may generate the prediction block for the PU based on the decoding samples of the frame associated with the PU. If video encoder 20 uses inter-prediction to generate the prediction block for the PU, video encoder 20 may generate the prediction block for the PU based on decoding samples of one or more frames other than the frame associated with the PU.
After video encoder 20 generates the predicted luma block, the predicted Cb block, and the predicted Cr block for one or more PUs of the 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 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 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 the Cb residual block and the Cr residual block for 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 predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate 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.
Furthermore, as shown in fig. 4C, video encoder 20 may decompose the luma, Cb, and Cr residual blocks of the CU into one or more luma, Cb, and Cr transform blocks using quadtree partitioning. A transform block is a block of rectangular (square or non-square) samples to which the same transform is applied. A Transform Unit (TU) of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of a luma residual block of a CU. The Cb transform block may be a sub-block of a Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may comprise a single transform block and syntax structures for transforming the samples of the transform block.
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 scalars. Video encoder 20 may apply one or more transforms to Cb transform blocks of the TU to generate Cb coefficient blocks for the TU. Video encoder 20 may apply one or more transforms to a Cr transform block of a TU to generate a Cr coefficient block for the TU.
After generating the coefficient block (e.g., a luminance coefficient block, a Cb coefficient block, or a Cr coefficient block), video encoder 20 may quantize the coefficient block. Quantization generally refers to the process by which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After video encoder 20 quantizes the coefficient block, video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, video encoder 20 may perform Context Adaptive Binary Arithmetic Coding (CABAC) on syntax elements indicating quantized transform coefficients. Finally, video encoder 20 may output a bitstream that includes the bit sequence that forms a representation of the encoded frames and associated data, which is stored in storage device 32 or transmitted to target device 14.
Upon 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 the frames of video data based at least in part on syntax elements obtained from the bitstream. The process of reconstructing the video data is generally reciprocal to the encoding process performed by video encoder 20. For example, video decoder 30 may perform inverse transforms 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 the encoded block of the current CU by adding samples of the prediction block for the PUs of the current CU to corresponding samples of the transform blocks of the TUs of the current CU. After reconstructing the encoded blocks for each CU of a frame, video decoder 30 may reconstruct the frame.
As described above, video coding mainly uses two modes, i.e., intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction), to achieve video compression. Palette-based coding is another coding scheme that has been adopted by many video coding standards. In palette-based codecs, which may be particularly suitable for screen-generated content codecs, a video codec (e.g., video encoder 20 or video decoder 30) forms a palette table that represents the colors of video data for a given block. The palette table includes the most dominant (e.g., frequently used) pixel values in a given block. Pixel values that are not frequently represented in the video data of a given block are not included in the palette table or are included in the palette table as escape colors.
Each entry in the palette table includes 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 which entry from the palette table is to be used to predict or reconstruct which sample. This palette mode begins with the process of generating a palette predictor for a first block of a picture, slice, tile, or other such grouping of video blocks. As will be explained below, the palette predictor for a subsequent video block is typically generated by updating a previously used palette predictor. For the purpose of illustration, it is assumed that the palette predictor is defined at the picture level. In other words, a picture may include multiple coding blocks, each with its own palette table, but there is one palette predictor for the entire picture.
To reduce the bits required to signal palette entries in a video bitstream, a video decoder may utilize a palette predictor to determine new palette entries in 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 even be initialized with a recently used palette table by including all entries of the recently used palette table. In some implementations, the palette predictor may include fewer than all entries from the most recently used palette table, 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 the different block, or may be larger or smaller than the palette table used to encode the different block. In one example, the palette predictor is implemented as a first-in-first-out (FIFO) table comprising 64 palette entries.
To generate a palette table for a block of video data from a palette predictor, a video decoder may receive a one-bit flag for each entry of the palette predictor from an encoded video bitstream. The one-bit flag may have a first value (e.g., a binary one) indicating that the associated entry of the palette predictor is to be included in the palette table or a second value (e.g., a binary zero) indicating that the associated entry of the palette predictor is not to be included in the palette table. If the size of the palette predictor is larger than the palette table for the block of video data, the video decoder may stop receiving more flags once the maximum size for the palette table is reached.
In some embodiments, some entries in the palette table may be signaled directly in the encoded video bitstream without palette predictor determination. For such entries, the video decoder may receive three separate m-bit values from the encoded video bitstream that indicate pixel values for the luma component and the two chroma components associated with the entry, where m represents a bit depth of the video data. Those palette entries derived from the palette predictor require only one-bit flags compared to the multiple m-bit values required for the directly signaled palette entries. Thus, signaling some or all of the palette entries using the palette predictor may significantly reduce the number of bits required to signal the entries of the new palette table, thereby improving the overall codec efficiency of palette mode codec.
In many cases, the palette predictor for a block is determined based on a palette table used to encode one or more previously encoded blocks. But when coding the first coding tree unit in a picture, slice, or tile, the palette table for the previously coded block may not be available. Thus, the entries of the previously used palette table cannot be used to generate palette predictors. In this case, a sequence of palette predictor initialization values, which are values used to generate the palette predictor when a previously used palette table is not available, may be signaled in a Sequence Parameter Set (SPS) and/or a Picture Parameter Set (PPS). SPS generally refers to a syntax structure of syntax elements applied to a series of consecutive coded video pictures, called a Coded Video Sequence (CVS), where the CVS is determined by the content of syntax elements found in PPS, referred to by syntax elements found in the header of each slice segment. PPS generally refers to a syntax structure of syntax elements applied to one or more individual pictures within a CVS determined by the syntax elements found in each slice segment header. Thus, SPS is generally considered to be a higher level syntax structure than PPS, meaning that syntax elements included in SPS typically change less frequently and apply to a larger portion of video data than syntax elements included in PPS.
Fig. 5 is a block diagram illustrating an example low frequency undivided transform (LFNST) process, wherein the LFNST process is a quadratic transform used to compress the energy of transform coefficients of an intra-coded block after a first transform, in accordance with some embodiments of the present disclosure. As shown in the figure, LFNST is applied between the first forward transform and quantization within video encoder 20, and between inverse quantization and first inverse transform within video decoder 30. In some embodiments, an indivisible transform with varying transform sizes is applied based on the size of one encoded block, which can be depicted as the following matrix multiplication process. It is assumed that LFNTS is applied to samples within a 4 x 4 block, i.e.,
Figure BDA0003769632690000181
is first serialized into a vector, as shown below
Figure BDA0003769632690000182
Then, LFNTS is applied as
Figure BDA0003769632690000183
Wherein
Figure BDA0003769632690000184
Is the transform coefficient after LFNTS, and T is the transform kernel. In this example, T is a 16 × 16 matrix. The 16 x 1 vectors are then scanned according to a predefined scan order
Figure BDA0003769632690000185
Reorganized into 4 x 4 blocks, where the vector startsWill be associated with the smaller scan index in the 4 x 4 block.
As can be seen from the above examples, LFNST is based on direct matrix multiplication, which is rather expensive in terms of computational operations and memory for storing transform coefficients. In some embodiments, a reduced indivisible transform kernel is used to reduce the implementation cost of LFNST. The main idea of this method is to map an N-dimensional vector to an R-dimensional vector in different spaces, where R < N. Therefore, instead of performing an N × N matrix, the forward LFNST becomes an R × N matrix as follows:
Figure BDA0003769632690000191
wherein T is generated by selecting the first R basis vectors of the original N-dimensional transformation matrix (i.e., NxN) R×N R basis vectors of (a).
After applying LFNST, all transform coefficients beyond the upper left potentially non-zero LFNST coefficient region are forced to zero. For transform blocks of size 4 × 4, 8 × 8, 4 × M, and/or mx 4, the upper left potentially non-zero LFNST coefficient region includes the first 8 coefficient positions along the coefficient scan order. For all other sizes of transform blocks, the upper-left potentially non-zero LFNST coefficient region includes the coefficient positions in the upper-left 4 x 4 sub-block. In the following description of the present disclosure, such a potential non-zero LFNST coefficient region is referred to as a "non-zero LFNST region" for convenience of description.
In some embodiments, there are a total of four transform sets, with each transform set enabling two indivisible transform cores. The transform set is selected according to an intra prediction mode of an intra block. The mapping from the intra prediction mode to the transform set is predefined as shown in table 1 below. For each transform set, the selected indistinguishable quadratic transform candidates are indicated by signaling an LFNST index in the video bitstream.
Intra prediction mode Collection
IntraPredMode<0 1
0<Intra prediction mode<=1 0
2<Intra prediction mode<=12 1
13<Intra prediction mode<=23 2
24<Intra prediction mode<=44 3
45<Intra prediction mode<=55 2
56<Intra prediction mode<=80 1
81<Intra prediction mode<=83 0
TABLE 1 mapping between Intra mode and LFNST transform set
In some embodiments, the LFNST index may be used for parsing at the video decoder only when all transform coefficients outside the first 4 x 4 sub-block of a given transform block are zero. Signaling the LFNST index depends on the position of the last significant coefficient, which indicates the number of non-zero coefficients in the transform block. For example, for 4 x 4 and 8 x 8 coding blocks, the LFNST index is signaled only when the position of the last significant (i.e., non-zero) transform coefficient is less than 8; for other coded block sizes, the LFNST index is signaled only when the position of the last significant transform coefficient is less than 16; otherwise, the LFNST index is not signaled and is always inferred to be zero, i.e. LFNST is disabled. In some other embodiments, a minimum threshold (e.g., 1) is set for the LFNST index such that the LFNST index is not signaled when the total number of non-zero transform coefficients is equal to or less than the minimum threshold.
Furthermore, to reduce the cache buffer size of transform coefficients, LFNST is disabled when the width or height of the current coding block is larger than the maximum transform size (e.g., 64) in the Sequence Parameter Set (SPS) as signaled. In some embodiments, LFNST is only applied when the first transform is DCT 2. LFNST is applied to intra-coded blocks in both intra and inter slices, and to both luma and chroma components. If a dual tree/local tree (i.e., a split tree) is enabled, where partitions of the luma and chroma components are not aligned, LFNST indices are signaled separately for the luma and chroma components (i.e., different LFNST transforms may be applied for the luma and chroma components). Otherwise, when a single tree is applied (where the partitions of the luma and chroma components are aligned), a single LFNST index is signaled and the luma and chroma components share one and the same LFNST transform.
Fig. 6 is a block diagram illustrating an example transform block 600 having non-zero transform coefficients, according to some embodiments of the present disclosure. The transformation block 600 includes a first region 602 corresponding to the grid-on-left portion of the transformation block 600 and a second region 604 represented by the dotted line portion of the transformation block 600. The first region 602 transforms the block 600 to have a predefined size (e.g., the top left 16 x 16 region) and includes one or more non-zero transform coefficients (e.g., a first non-zero coefficient 606, a second non-zero coefficient 608, and a third non-zero coefficient 610). The second region 604 is a region outside the first region 602 that may or may not include one or more non-zero transform coefficients.
In the current VVC, signaling the LFNST index depends on the availability of decoded transform coefficients for all components in the CU. Signaling LFNST is conditioned on the position of the last non-zero coefficient of the three components in the CU, because all transform coefficients beyond the non-zero LFNST region are forced to zero after applying LFNST. In particular, for 4 × 4 CUs and 8 × 8 CUs, the LFNST index is signaled only when the position of the last non-zero coefficient of all components (which apply the transform to the residual codec, i.e. the non-transform skip component) is less than 8; for other CU sizes, the LFNST index is signaled only when the position of the last non-zero coefficient of all non-transform skip components is less than 16. This parsing dependency may cause undesirable delays for hardware encoders and decoders. For example, with this design, decoding of the luma component cannot begin until the parsing of the chroma residual in one TU is complete.
In some embodiments, a simplified LFNST signaling method is proposed to remove the analytic dependency of the LFNST index on the availability of transform coefficients for both luma TB and chroma TB in one CU. Due to the removal of the resolution dependencies, the decoder may obtain information on whether LFNST is applied to one current CU in time, so that an accurate CCB limit may be calculated based on the corresponding number of potential non-zero coefficients.
As mentioned before, LFNST is signaled at the end of a CU within one frame, and the signaling of LFNST index depends on the position of the last significant coefficient of all code components. For example, due to the return-to-zero constraint applied to LFNST, LFNST indexing is signaled only when the position of the last non-zero coefficient of the code component is outside the corresponding return-to-zero region. To solve this problem, LFNST signaling is only conditioned on the position of the last significant coefficient of the luma component, as shown in the syntax table below.
Figure BDA0003769632690000211
Figure BDA0003769632690000221
As shown in the syntax table above, in the single tree case, LFNST signaling is only conditioned on the position of the last significant coefficient of the luma component in the proposed method. For example, for 4 × 4 and 8 × 8 coding blocks, the LFNST index is signaled only when the position of the last luma significant transform coefficient is less than 8; for other coding block sizes, the LFNST index is only signaled if the position of the last luma significant transform coefficient is less than 16. In the case of a split tree, LFNST indices are signaled separately for the luma and chroma components. In addition, the original DC-only constraint is applied such that the LFNST index is only signaled when the position of the last luminance significant coefficient is equal to or greater than 1.
As mentioned above, the luma samples and chroma samples of an encoded block may be partitioned using a single tree or two separate trees. This feature may affect signaling LFNST indices. For example, when a luminance sample and a chrominance sample of a coding block are divided by a single tree, only a transform coefficient corresponding to the luminance sample is suitable for LFNST, and the chrominance sample is not suitable for LFNST. In this case, there is no need to verify the position of the last non-zero coefficient corresponding to any chroma sample of the coded block before receiving the LFNST index. In effect, only the position of the last non-zero coefficient corresponding to a luma sample of a coding block is relevant for determining whether LFNST has been enabled for the coding block. But when the luma samples and chroma samples of a coded block are partitioned by two separate trees, LFNST is applied to the luma samples and chroma samples separately, each with its own LFNST index.
Fig. 7 is a flow diagram 700 illustrating an exemplary process by which a video codec (e.g., video decoder 30) implements a technique for conditionally signaling LFNSTs based on different components of a transform block, according to some embodiments of the present disclosure.
Video decoder 30 receives (710) a control flag associated with a coding block or blocks. This control flag indicates whether luma samples and chroma samples of a coded block in the video data are partitioned based on a single tree or two disjoint trees. The video decoder also receives (720) a bitstream corresponding to the coding block, which may include transform coefficients associated with different components of the coding block.
Next, video decoder 30 determines the partition tree type for the coding block based on the control flag. When the control flag indicates that the luma samples and chroma samples are single tree partitioned (730-1), video decoder 30 determines (740-1) a scan order index for the last non-zero transform coefficient for the luma samples of the coded block. As mentioned above, single tree partitioning means that only luma samples of the coded block are applicable to LFNST. When the scan order index of the last non-zero transform coefficient meets a predefined criterion (750-1), the video decoder then receives (760-1) an LFNST index from the bitstream and applies (770-1) an inverse LFNST transform to the transform coefficients of luma samples of the coded block based on the LFNST index.
When the control flag indicates that the luma samples and chroma samples are partitioned by two separation trees (730-2), video decoder 30 determines (740-2) the scan order indices for the last non-zero transform coefficients of the luma samples and chroma samples of the encoded block, respectively. As described above, the luminance component and the chrominance component are separately processed by LFNST. For example, when a respective one of the scan order indices of the last non-zero transform coefficient corresponding to luma samples or chroma samples satisfies a predefined criterion (750-2), the video decoder then receives (760-2) an LFNST index corresponding to the component from the bitstream and applies (770-2) a respective inverse LFNST transform to the transform coefficients of the corresponding component of the encoded block based on the corresponding LFNST index.
In some embodiments, prior to applying the inverse LFNST transform to transform coefficients of luma or chroma samples of the coding block, video decoder 30 first determines a value of the LFNST index and then identifies the LFNST transform kernel based on the corresponding LFNST index when the corresponding LFNST index is non-zero. As mentioned above, the video codec may access multiple LFNST transform cores, and video encoder 20 selects one of the multiple LFNST transform cores for performing LFNST on the encoded block, and signals an index of the selected LFNST transform core in the video data. The video decoder 30 then receives the LFNST index from the video data and then uses the identified LFNST transform kernel to inverse transform the transform coefficients of the corresponding samples of the coding block.
In some embodiments, the predefined criteria described above is met when the scan order index of the last non-zero transform coefficient is not less than a minimum threshold associated with the coding block and is less than a maximum threshold associated with the coding block. For example, the minimum threshold is 1, while the maximum threshold depends on the size of the coding block, such as 8 for a 4 × 4 coding block or 8 × 8 coding block, or 16 for other coding block sizes. Similar to MTS, the inverse LFNST transform is applied to non-zero transform coefficients within the upper left region of the transform block corresponding to the coding block, and the scan order is a diagonal scan order.
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 over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. The computer readable medium may include a computer readable storage medium corresponding to a tangible medium such as a data storage medium or a communication medium including any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol). In this manner, the computer-readable medium may generally correspond to (1) a non-volatile tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the implementations described herein. The computer program product may include a computer-readable medium.
The terminology used in the description of 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 the description of the embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms "comprises" and/or "comprising …," when used in this specification, specify the presence of stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components, and/or groups thereof.
It will also be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only 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 embodiments. The first electrode and the second electrode are both electrodes, but they are not the same electrode.
The description of the present 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 of ordinary skill in the art having the benefit of the teachings presented in the foregoing descriptions and the associated drawings. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments and with the best mode contemplated for use with the general principles and with various modifications as are suited to the particular use contemplated. Therefore, it is to be understood that the scope of the claims is not to be limited to the specific examples of the embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the appended claims.

Claims (9)

1. A method of decoding video data, the method comprising:
receiving a control flag indicating whether luma samples and chroma samples of a coding block in the video data are partitioned based on a single tree or two disjoint trees;
receiving a bit stream corresponding to the coding block;
the determined luminance and chrominance samples are split by a single tree:
determining a scan order index for a last non-zero transform coefficient of the luma samples of the coding block;
according to the determined scan order index of the last non-zero transform coefficient satisfying a predefined criterion:
receiving a low frequency indivisible transform, LFNST, index from the bitstream; and is
Applying an inverse LFNST transform to transform coefficients of the luma samples of the coding block based on the LFNST index;
segmenting by two separation trees according to the determined luminance and chrominance samples:
determining a scanning order index for the last non-zero transform coefficients of the luma samples and the chroma samples of the encoded blocks, respectively;
according to a respective one of the determined scan order indices of the last non-zero transform coefficient satisfying the predefined criterion:
receiving a corresponding LFNST index from the bitstream; and is
Based on the corresponding LFNST index, a corresponding inverse LFNST transform is applied to transform coefficients of corresponding sample points of the coding block.
2. The method of claim 1, wherein applying a respective inverse LFNST transform to transform coefficients of corresponding samples of the coding block based on the corresponding LFNST index, further comprises:
according to the determined LFNST index being non-zero:
identifying an LFNST transform core based on the corresponding LFNST index; and is
Inverse transforming the transform coefficients of the corresponding sample points of the coding block using the identified LFNST transform kernel.
3. The method of claim 1, wherein the predefined criteria is met when a scan order index of the last non-zero transform coefficient is not less than a minimum threshold associated with the coding block and less than a maximum threshold associated with the coding block.
4. The method of claim 3, wherein the minimum threshold is 1 and the maximum threshold depends on a size of the coding block.
5. The method of claim 4, wherein the maximum threshold is 8 for 4 x 4 or 8 x 8 coding blocks or 16 for other coding block sizes.
6. The method of claim 1, wherein the inverse LFNST transform is applied to non-zero transform coefficients within an upper left region of a transform block corresponding to the coding block.
7. The method of claim 1, wherein the scan order is a diagonal scan order.
8. An electronic device, comprising:
one or more processing units;
a memory coupled to the one or more processing units; 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 of claims 1-7.
9. A non-transitory computer readable storage medium storing a plurality of programs for execution by an electronic device having one or more processing units, wherein the plurality of programs, when executed by the one or more processing units, cause the electronic device to perform the method of claims 1-7.
CN202180011530.4A 2020-01-28 2021-01-28 Method and apparatus for transform and coefficient signaling Active CN115004706B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US202062966871P 2020-01-28 2020-01-28
US62/966,871 2020-01-28
PCT/US2021/015504 WO2021155005A1 (en) 2020-01-28 2021-01-28 Methods and apparatus on transform and coefficient signaling

Publications (2)

Publication Number Publication Date
CN115004706A true CN115004706A (en) 2022-09-02
CN115004706B CN115004706B (en) 2024-06-04

Family

ID=77079440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202180011530.4A Active CN115004706B (en) 2020-01-28 2021-01-28 Method and apparatus for transform and coefficient signaling

Country Status (2)

Country Link
CN (1) CN115004706B (en)
WO (1) WO2021155005A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220150518A1 (en) * 2020-11-11 2022-05-12 Tencent America LLC Method and apparatus for video coding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120163455A1 (en) * 2010-12-22 2012-06-28 Qualcomm Incorporated Mode dependent scanning of coefficients of a block of video data
US20160044314A1 (en) * 2014-08-08 2016-02-11 Qualcomm Incorporated System and method for reusing transform structure for multi-partition transform
US20180184131A1 (en) * 2015-06-11 2018-06-28 Lg Electronics Inc. Method for encoding/decoding image and device therefor
CN110622511A (en) * 2017-04-13 2019-12-27 Lg 电子株式会社 Image encoding/decoding method and apparatus thereof
CN110636313A (en) * 2019-09-18 2019-12-31 浙江大华技术股份有限公司 Transformation and quadratic transformation matrix training method, encoder and related device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10291934B2 (en) * 2013-10-02 2019-05-14 Arris Enterprises Llc Modified HEVC transform tree syntax
US10972758B2 (en) * 2018-04-02 2021-04-06 Qualcomm Incorporated Multi-type-tree framework for transform in video coding
PL3806476T3 (en) * 2018-06-03 2023-09-11 Lg Electronics Inc. Method and device for processing video signal by using reduced transform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120163455A1 (en) * 2010-12-22 2012-06-28 Qualcomm Incorporated Mode dependent scanning of coefficients of a block of video data
US20160044314A1 (en) * 2014-08-08 2016-02-11 Qualcomm Incorporated System and method for reusing transform structure for multi-partition transform
US20180184131A1 (en) * 2015-06-11 2018-06-28 Lg Electronics Inc. Method for encoding/decoding image and device therefor
CN110622511A (en) * 2017-04-13 2019-12-27 Lg 电子株式会社 Image encoding/decoding method and apparatus thereof
CN110636313A (en) * 2019-09-18 2019-12-31 浙江大华技术股份有限公司 Transformation and quadratic transformation matrix training method, encoder and related device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沈燕飞;李锦涛;朱珍民;张勇东;: "高效视频编码", 计算机学报, no. 11, 15 November 2013 (2013-11-15) *

Also Published As

Publication number Publication date
CN115004706B (en) 2024-06-04
WO2021155005A1 (en) 2021-08-05

Similar Documents

Publication Publication Date Title
CN114710679B (en) Small chroma block size limitation in video coding and decoding
CN114501000B (en) Method and electronic device for video encoding
JP7490106B2 (en) VIDEO ENCODING METHOD, ELECTRONIC DEVICE, AND PROGRAM
US11985311B2 (en) Prediction mode signaling in video coding
US20220086464A1 (en) Methods and apparatus of segment-based video coding using palette mode
CN115802061B (en) Method for encoding video data, electronic device and storage medium
CN115004706B (en) Method and apparatus for transform and coefficient signaling
CN114175641A (en) Lossless codec efficiency in video codec
JP7401631B2 (en) Method and device for video coding using palette mode
CN114208172A (en) Method and apparatus for performing rate-distortion analysis for palette mode
CN114026873A (en) Method and apparatus for prediction simplification in video coding and decoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant