Method and apparatus for transform training and coding and decoding
By using inverse transform cores and positive transform cores different from those in the encoding and decoding process in video encoding and decoding, the problem of insufficient transformation encoding and decoding efficiency in the prior art is solved, and more efficient video data compression is achieved.
Patent Information
- Application Number
- CN202380064983.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-09-10
- Filing Date
- 2023-09-11
- Publication Date
- 2025-04-18
AI Technical Summary
The existing transform codec methods have shortcomings in encoding and decoding efficiency, making it difficult to effectively compress video data.
By determining the inverse transform core for the current decoding block during the video decoding process, and determining the positive transform core for the current encoded block during the video encoding process, the inverse transform core and the positive transform core are different from the transform core used in the encoding and decoding process.
Improve the encoding and decoding efficiency of transformed encoding and decoding, and enhance the compression ability of video data.
Smart Images

Figure CN119856495A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims priority from U.S. Provisional Application No. 63 / 405,431, filed on September 10, 2022, entitled “Methods and Apparatus for Transform Training and Coding,” the entire contents of which are incorporated herein by reference for all purposes. Technical Field
[0003] The present disclosure relates to video coding and compression, and in particular, but not limited to, methods and apparatus for improving the coding efficiency of transform codecs. Background Art
[0004] Various video codec technologies can be used to compress video data. Video coding is performed according to one or more video codec standards. For example, today, some well-known video codec standards include Universal Video Codec (VVC), High Efficiency Video Codec (HEVC, also known as H.265 or MPEG-H Part 2) and Advanced Video Codec (AVC, also known as H.264 or MPEG-4 Part 10) jointly developed by ISO / IEC MPEG and ITU-TVECG. AOMedia Video 1 (AV1) was developed by the Alliance for Open Media (AOM) as a successor to its previous standard VP9. Audio Video Coding (AVS) refers to digital audio and digital video compression standards, another video compression standard series developed by the Chinese Audio and Video Coding Standard Working Group. Most existing video codec standards are based on the well-known hybrid video codec framework, that is, block-based prediction methods (e.g., inter-frame prediction, intra-frame prediction) are used to reduce the redundancy present in video images or sequences, and transform coding is used to compress the energy of prediction errors. An important goal of video coding technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation. However, existing transform coding methods do not have good coding efficiency. Summary of the invention
[0005] The present disclosure provides embodiments of technologies related to improving the encoding and decoding efficiency of transform coding.
[0006] According to a first aspect of the present disclosure, a method for video decoding is provided. In the method, a decoder may determine an inverse transform kernel for a residual block corresponding to a current decoded block; and determine a reconstructed block based on the inseparable transform kernel, the residual block, and the current decoded block, wherein the inverse transform kernel is different from a forward transform kernel used to transform the residual block during encoding.
[0007] According to a second aspect of the present disclosure, a method for video encoding is provided. In the method, an encoder may determine a forward transform kernel for a residual block corresponding to a current coding block; and wherein the forward transform kernel is different from an inverse transform kernel used to transform the residual block during decoding.
[0008] According to a third aspect of the present disclosure, a device for video encoding is provided. The device may include one or more processors and a memory, wherein the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to perform the method according to the first aspect or the second aspect when executing the instructions.
[0009] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium for storing computer-executable instructions is provided, wherein the computer-executable instructions, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and execute the method according to the first aspect.
[0010] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium for storing computer-executable instructions is provided, wherein the computer-executable instructions, when executed by one or more computer processors, cause the one or more computer processors to execute the method according to the second aspect to generate a bit stream and send the generated bit stream.
[0011] According to a sixth aspect of the present disclosure, a bit stream is provided, wherein the bit stream is decoded by the method for video decoding according to the first aspect.
[0012] According to a seventh aspect of the present disclosure, a bit stream is provided, wherein the bit stream is generated by the method for video encoding according to the second aspect.
[0013] It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0015] Figure 1 is a block diagram illustrating a system for encoding and decoding video blocks according to some embodiments of the present disclosure.
[0016] Figure 2A is a block diagram of an encoder according to some embodiments of the present disclosure.
[0017] Figure 2B is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.
[0018] Figure 2C-2G is a block diagram illustrating how to recursively partition a frame into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.
[0019] Figure 3A is a block diagram of a decoder according to some embodiments of the present disclosure.
[0020] Figure 3B is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.
[0021] Figure 3C-Figure 3K is a block diagram showing how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some examples of the present disclosure.
[0022] Figure 4 An example of a low frequency non-separable transform (LFNST) process according to some embodiments of the present disclosure is shown.
[0023] Figure 5A-5D Examples of sub-block transform (SBT) types and SBT positions according to some embodiments of the present disclosure are shown.
[0024] Figure 6 An example of a region of interest (ROI) for LFNST 16 is shown according to some embodiments of the present disclosure.
[0025] Figure 7 An example of a ROI for LFNST8 is shown according to some embodiments of the present disclosure.
[0026] Figure 8 is a flow chart of a Karhunen-Loève transform (KLT) that explores non-local correlations according to some embodiments of the present disclosure.
[0027] Fig. 9 A diagram illustrating a template for transforming block clusters according to some embodiments of the present disclosure.
[0028] Fig.10 Diagram showing clustering of training data based on prediction patterns and neighboring templates.
[0029] Fig.11 is a diagram illustrating a computing environment coupled to a user interface according to some embodiments of the present disclosure.
[0030] Fig.12 is a flowchart illustrating a method for video decoding according to some embodiments of the present disclosure.
[0031] Fig.13 is a flow chart illustrating a training method according to some embodiments of the present disclosure.
[0032] Fig.14 is a flowchart illustrating a method for video encoding according to some embodiments of the present disclosure.
[0033] Fig.15 is a flow chart illustrating a training method according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0034] Reference will now be made in detail to specific embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, many non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, various alternatives may be used. For example, the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0035] The terms used in this disclosure are only suitable for the purpose of describing specific embodiments and are not intended to limit the present disclosure. In the present disclosure and the appended claims, singular forms ("a / an", "the", "said", etc.) are also intended to include plural forms, unless other meanings are clearly indicated throughout the disclosure. It should also be understood that the term "and / or" used in this disclosure indicates and includes one or any or all possible combinations of the listed multiple related items.
[0036] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some embodiments," or similar language mean that the particular features, structures, or characteristics being described are included in at least one embodiment or example. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments are also applicable to other embodiments.
[0037] Throughout the disclosure, unless otherwise explicitly stated, the terms "first", "second", "third", etc. are used only as references to related elements (e.g., devices, components, compositions, steps, etc.), and do not imply any spatial or temporal order. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components, or operating states of the same device, and may be named arbitrarily.
[0038] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include a memory (shared, dedicated, or group) storing code or instructions that may be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components connected directly or indirectly. These components may or may not be physically attached to each other or located adjacent to each other.
[0039] As used herein, the terms "if" or "when" may be understood to mean "based on" or "in response to" depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when or if condition X exists, perform function or action X', and ii) when or if condition Y exists, perform function or action Y'. The method may be implemented with the ability to perform function or action X' and the ability to perform function or action Y'. Therefore, both functions X' and Y' may be performed at different times during multiple executions of the method.
[0040] A unit or module may be implemented purely by software, purely by hardware, or by a combination of hardware and software. In a pure software implementation, for example, a unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.
[0041] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a target device 14. Source device 12 and target device 14 may include any of a wide variety of electronic devices, including a cloud server, a server computer, a desktop or laptop computer, a tablet computer, a smart phone, a set-top box, a digital television, a camera, a display device, a digital media player, a video game console, a video streaming device, etc. In some implementations, source device 12 and target device 14 are equipped with wireless communication capabilities.
[0042] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the 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 sent 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 a portion 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, a switch, a base station, or any other device that may be useful in facilitating communication from the source device 12 to the target device 14.
[0043] 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 the storage device 32 may be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disk (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that can store the encoded video data generated by the source device 12. The target device 14 can access the stored video data from the storage device 32 via streaming or downloading. The file server can be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, or a local disk drive. The target device 14 may access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both. 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 transmission and a download transmission.
[0044] like Figure 1 As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application are generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.
[0045] The captured, pre-captured, or computer-generated video may be encoded by the 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 a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may also include a modem and / or a transmitter.
[0046] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data communicated via 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 in the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.
[0047] In some embodiments, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to the 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.
[0048] The video encoder 20 and the video decoder 30 may operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, MPEG-4, Part 10, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 may be configured to decode video data according to any of these current standards or future standards.
[0049] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, respectively, such as one or more microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-volatile computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.
[0050] In some embodiments, at least some components of source device 12 (eg, video source 18, video encoder 20, or a component included in video encoder 20 as described below) may be used to generate a video signal. Figure 2A Components described herein, and output interface 22) and / or at least some components of target device 14 (eg, input interface 28, video decoder 30, or components included in video decoder 30 as described below with reference to Figure 3AThe components described herein, and the display device 34) may be run in a cloud computing service network, which may provide software, platforms and / or infrastructure, such as software as a service (SaaS), platform as a service (PaaS) or infrastructure as a service (IaaS). In some embodiments, one or more components in the source device 12 and / or the target device 14 that are not included in the cloud computing service network may be set in one or more client devices, and the one or more client devices may communicate with the server computer in the cloud computing service network through a wireless communication network (e.g., a cellular communication network, a short-range wireless communication network or a global navigation satellite system (GNSS) communication network) or a wired communication network (e.g., a local area network (LAN) communication network or a power line communication (PLC) network). In an embodiment, at least a portion of the operations described herein may be implemented as a cloud-based service provided by one or more server computers in the cloud computing service network, the one or more server computers being implemented by at least some components of the source device 12 and / or at least some components of the target device 14; one or more other operations described herein may be implemented by one or more client devices. In some embodiments, the cloud computing service network may be a private cloud, a public cloud or a hybrid cloud. The terms "cloud", "cloud computing", "cloud-based", etc. in this document may be used interchangeably without departing from the scope of the present disclosure. It should be understood that the present disclosure is not limited to being implemented in the above-mentioned cloud computing service network. Alternatively, the present disclosure may also be implemented in any other type of computing environment currently known or developed in the future.
[0051] Figure 2A is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 may perform intra-frame prediction encoding and inter-frame prediction encoding of video blocks within a video frame. Intra-frame prediction encoding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction encoding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that the term "frame" may be used as a synonym for the term "image" or "picture" in the field of video coding and decoding.
[0052] like Figure 2AAs shown in FIG. 1 , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 also includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 (such as a deblocking filter) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. In addition to the deblocking filter, another loop filter, such as a sample adaptive offset (SAO) filter, a cross component sample adaptive offset (CCSAO) filter and / or an adaptive loop filter (ALF) may be used to filter the output of the adder 62. It should be noted that for the CCSAO technology, the present application is not limited to the embodiments described herein, and alternatively, the present application may be applied to the following case: according to any one of the luminance component, the Cb chrominance component and the Cr chrominance component, an offset for any other component of the luminance component, the Cb chrominance component and the Cr chrominance component is selected to modify the any other component based on the selected offset. In addition, it should be noted that the first component mentioned herein may be any one of the luminance component, the Cb chrominance component, and the Cr chrominance component, the second component mentioned herein may be any other component of the luminance component, the Cb chrominance component, and the Cr chrominance component, and the third component mentioned herein may be the remaining one of the luminance component, the Cb chrominance component, and the Cr chrominance component. In some embodiments, the loop filter may be omitted, and the decoded video block may be provided directly to the DPB 64 by the adder 62. The video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed in one or more of the fixed or programmable hardware units described.
[0053] 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 Figure 1The video data memory 40 and the DPB 64 are obtained from the video source 18 shown. The DPB 64 is a buffer that stores reference video data (reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding video data. The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various embodiments, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.
[0054] like Figure 2A As shown in , after receiving the video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning operation may also include partitioning the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (Coding Unit, CU) according to a predefined splitting structure associated with the video data (e.g., a quadtree (Quad-Tree, QT) structure). A video frame is or can be considered to be a two-dimensional array or matrix of samples with sample values. The samples in the array may also be referred to as pixels or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. The video frame may be divided into multiple video blocks by (for example) using QT partitioning. A video block is also or can be considered to be a two-dimensional array or matrix of samples with sample values, but the size of the video block is smaller than the video frame. The number of samples in the horizontal and vertical directions (or axes) of the video block defines the size of the video block. The video block may be further divided into one or more block partitions or sub-blocks (which may again form blocks) by, for example, iteratively using QT partitioning, binary-tree (BT) partitioning or ternary-tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" as used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block, such as a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB) and / or correspond to a sub-block.
[0055] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., code rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block (e.g., prediction block) or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.
[0056] 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 encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, e.g., to select an appropriate coding mode for each block of video data.
[0057] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion for a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame, the prediction block in the reference frame relative to the current block being encoded in the current frame. The predetermined pattern may designate video frames in a sequence as P frames or B frames. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vectors determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine the block vector.
[0058] In terms of pixel differences, the prediction block of the video block may be or may correspond to a block or reference block of a reference frame that closely matches the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of square differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may interpolate values for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and the fractional pixel positions and output a motion vector with fractional pixel precision.
[0059] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.
[0060] The motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values by subtracting the pixel values of the prediction block provided by the motion compensation unit 44 from the pixel values of the current video block being encoded. The pixel difference values forming the residual video block may include a luma difference component or a chroma difference component or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying a prediction block, any flag indicating a prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are shown separately for conceptual purposes.
[0061] In some embodiments, the intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some embodiments, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during different encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values for the various tested intra prediction modes using rate-distortion analysis, and select the intra prediction mode with the best rate-distortion characteristics among the tested modes as the suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to generate the coded block, as well as the bit rate (i.e., the number of bits) used to generate 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.
[0062] In other embodiments, 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 in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identification of the prediction block may include calculating values for sub-integer pixel positions.
[0063] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, video encoder 20 can form pixel difference values by subtracting the pixel values of the prediction block from the pixel values of the current video block being encoded, thereby forming a residual video block. The pixel difference values forming the residual video block may include both luma component differences and chroma component differences.
[0064] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 may perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 may determine an intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 may use various intra-frame prediction modes to encode the current block, for example, during different encoding channels, and the intra-frame prediction processing unit 46 (or in some embodiments, the mode selection unit) may select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 may provide information indicating the intra-frame prediction mode selected for the block to the entropy coding unit 56. The entropy coding unit 56 may encode the information indicating the selected intra-frame prediction mode into the bitstream.
[0065] 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 TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.
[0066] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some embodiments, quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Optionally, entropy encoding unit 56 may perform the scan.
[0067] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to a video bitstream such as Figure 1 The video decoder 30 shown, or archived as Figure 1 Storage device 32 is shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.
[0068] 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 use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values for use in motion estimation.
[0069] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.
[0070] The first generation of AVS standards includes the Chinese national standards "Information Technology Advanced Audio and Video Codec Part 2: Video" (called AVS1) and "Information Technology Advanced Audio and Video Codec Part 16: Broadcasting and Television Video" (called AVS+). Compared with the MPEG-2 standard, it can provide about 50% bit rate savings at the same perceptual quality. In February 2006, the video part of the AVS1 standard was promulgated as a Chinese national standard. The second generation of AVS standards includes the Chinese national standard series "Information Technology High Efficiency Multimedia Codec" (abbreviated as AVS2), which is mainly aimed at the transmission of ultra-high-definition television (extra HD TV) programs. The codec efficiency of AVS2 is twice that of AVS+. In May 2016, AVS2 was released as a Chinese national standard. At the same time, the video part of the AVS2 standard was submitted by the Institute of Electrical and Electronics Engineers (IEEE) as an international standard for application. The AVS3 standard is a new generation of video codec standards for UHD video applications, aiming to exceed the codec efficiency of the latest international standard HEVC. In March 2019, at the 68th AVS meeting, the AVS3-P2 baseline was completed, which provides about 30% bitrate savings compared to the HEVC standard. Currently, there is a reference software called High Performance Model (HPM) maintained by the AVS group to demonstrate a reference implementation of the AVS3 standard.
[0071] Like HEVC, the AVS3 standard is built on a block-based hybrid video codec framework. Figure 2B A block diagram of a general block-based hybrid video coding system is given. The input video signal is processed block by block, which is called coding unit (CU). Unlike HEVC, which partitions blocks based only on quadtree, in AVS3, one coding tree unit (CTU) is partitioned into CUs based on quadtree / binary tree / extended quadtree to adapt to changing local characteristics. In addition, the concept of multiple partition unit types in HEVC is removed, that is, there is no distinction between CU, prediction unit (PU) and transform unit (TU) in AVS3; instead, each CU is always used as a basic unit for both prediction and transformation without further partitioning. In the tree partitioning structure of AVS3, one CTU is first partitioned based on the quadtree structure. Then, each quadtree leaf node can be further partitioned based on the binary tree and extended quadtree structures. As Figure 2C-2G As shown, there are five types of segmentation, four-element segmentation ( Figure 2C ), vertical binary segmentation ( Figure 2D ), horizontal binary segmentation ( Figure 2E ), vertically extended quadtree partitioning ( Figure 2F ) and horizontally extended quadtree partitioning ( Figure 2G ).exist Figure 2BIn the video code, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples of coded neighboring blocks in the same video picture / slice (which are called reference samples) to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in video signals. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in video signals. The temporal prediction signal for a given CU is usually signaled by one or more motion vectors (MVs), which indicate the amount and direction of motion between the current CU and its temporal reference. In addition, if multiple reference pictures are supported, a reference picture index is additionally sent, which is used to identify which reference picture in the reference picture repository the temporal prediction signal comes from. After spatial prediction and / or temporal prediction, the mode decision block in the encoder selects the optimal prediction mode, for example, based on a rate-distortion optimization method. The prediction block is then subtracted from the current video block; and the prediction residual is decorrelated using a transform and then quantized. The quantized residual coefficients are dequantized and inverse transformed to form a reconstructed residual, which is then added back to the prediction block to form the reconstructed signal of the CU. In addition, loop filtering, such as a deblocking filter, sample adaptive offset (SAO), and adaptive intra-loop filter (ALF), may be applied to the reconstructed CU before it is placed in a reference picture repository and used to encode and decode future video blocks. To form an output video bitstream, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit for further compression and packaging.
[0072] The first version of the HEVC standard was completed in October 2013, providing about 50% bit rate savings or equivalent perceptual quality compared to the previous generation video codec standard H.264 / MPEG AVC. Although the HEVC standard provides significant codec improvements compared to its predecessor, there is evidence that additional codec tools can be used on top of HEVC to achieve superior codec efficiency. Based on this, both VCEG and MPEG have begun exploring new codec technologies for future video codec standardization. ITU-TVECG and ISO / IECMPEG established a Joint Video Exploration Team (JVET) in October 2015 to begin important research on advanced technologies that can achieve substantial enhancements in codec efficiency. A reference software called the Joint Exploration Model (JEM) is maintained by JVET by integrating several additional codec tools on top of the HEVC Test Model (HM).
[0073] In October 2017, ITU-T and ISO / IEC issued a joint call for proposals (CfP) on video compression with capabilities beyond HEVC. In April 2018, 23 CfP responses were received and evaluated at the 10th JVET meeting, showing a compression efficiency gain of about 40% over HEVC. Based on such evaluation results, JVET initiated a new project to develop a new generation of video codec standards called Versatile Video Codec (VVC). In the same month, a reference software code base called VVC Test Model (VTM) was established to demonstrate a reference implementation of the VVC standard.
[0074] Like HEVC, VVC is built on a block-based hybrid video coding framework. Figure 2B A block diagram of a general block-based hybrid video coding system is given. The input video signal is processed block by block, which is called coding unit (CU). In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which is based only on quadtree partitioning blocks, in VVC, one coding tree unit (CTU) is divided into multiple CUs to adapt to the changing local characteristics based on quadtree / binary tree / ternary tree. In addition, the concept of multiple partition unit types in HEVC is removed, that is, there is no distinction between CU, prediction unit (PU) and transform unit (TU) in VVC; instead, each CU is always used as a basic unit for prediction and transformation without further division. In the multi-type tree structure, a CTU is first divided by a quadtree structure. Then, each quadtree leaf node can be further divided by a binary tree structure and a ternary tree structure. As Figure 2C-2G As shown, there are five types of segmentation, four-element segmentation ( Figure 2C ), vertical binary segmentation ( Figure 2D ), horizontal binary segmentation ( Figure 2E ), vertically extended quadtree partitioning ( Figure 2F ) and horizontally extended quadtree partitioning ( Figure 2G ).exist Figure 2BIn the video code, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples of coded neighboring blocks in the same video picture / slice (which are called reference samples) to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in video signals. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in video signals. The temporal prediction signal for a given CU is usually signaled by one or more motion vectors (MVs), which indicate the amount and direction of motion between the current CU and its temporal reference. In addition, if multiple reference pictures are supported, a reference picture index is additionally sent, which is used to identify which reference picture in the reference picture repository the temporal prediction signal comes from. After spatial prediction and / or temporal prediction, the mode decision block in the encoder selects the optimal prediction mode, for example, based on a rate-distortion optimization method. The prediction block is then subtracted from the current video block; and the prediction residual is decorrelated using a transform and then quantized. The quantized residual coefficients are dequantized and inverse transformed to form a reconstructed residual, which is then added back to the prediction block to form the reconstructed signal of the CU. In addition, loop filtering, such as a deblocking filter, sample adaptive offset (SAO), and an adaptive intra-loop filter (ALF), may be applied to the reconstructed CU before it is placed in a reference picture repository and used to encode and decode future video blocks. In order to form an output video bitstream, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit to be further compressed and packaged to form a bitstream.
[0075] Figure 3A 30 is a block diagram showing an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above combined Figure 2A The encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.
[0076] In some embodiments, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some embodiments, embodiments of the present disclosure may be dispersed in one or more of the multiple units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some embodiments, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).
[0077] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (such as a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 when decoding the video data (e.g., in an intra-frame or inter-frame prediction decoding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 3A 92 as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or by separate memory devices. In some embodiments, the video data memory 79 may be on-chip with the other components of the video decoder 30, or off-chip relative to those components.
[0078] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators and other syntax elements to the prediction processing unit 81.
[0079] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, intra-prediction unit 84 of prediction processing unit 81 may generate prediction data for a video block of a current video frame based on a signaled intra-prediction mode and reference data from a previously decoded block of the current frame.
[0080] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks may be generated from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference frames stored in the DPB 92.
[0081] In some embodiments, when a video block is decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.
[0082] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) for decoding the video block of the video frame, the inter prediction frame type (e.g., B or P), the construction information for one or more of the reference frame lists for the frame, the motion vector for each inter prediction encoded video block of the frame, the inter prediction state for each inter prediction encoded video block of the frame, and other information for decoding the video block in the current video frame.
[0083] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as a flag to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, a block vector for each intra BC predicted video block of the frame, an intra BC prediction state for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.
[0084] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video blocks to calculate interpolated values for sub-integer pixels of reference blocks. 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.
[0085] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.
[0086] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (such as a deblocking filter, an SAO filter, a CCSAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some embodiments, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1 on a display device 34).
[0087] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other cases, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.
[0088] Figure 3B A general block diagram of a block-based video decoder is given. The video bitstream is first entropy decoded at the entropy decoding unit. The coding mode and prediction information are sent to the spatial prediction unit (in the case of intra-frame coding) or the temporal prediction unit (in the case of inter-frame coding) to form a prediction block. The residual transform coefficients are sent to the dequantization unit and the inverse transform unit to reconstruct the residual block. The prediction block and the residual block are then added together. The reconstructed block can be further loop filtered before it is stored in the reference picture repository. The reconstructed video in the reference picture repository is then sent for display and for predicting future video blocks.
[0089] In addition, ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC1 / SC29 / WG11) are studying the potential need for standardization of future video codec technologies with compression capabilities that significantly exceed the current VVC standard. This future standardization action may take the form of additional extensions to VVC or a completely new standard. The groups are working together on this exploratory activity in a joint collaborative project called the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by their experts in this field. The first Exploration Experiment (EE) was established at the JVET meeting from January 6 to 15, 2021, and this exploratory software model was named the Enhanced Compression Model (ECM) and ECM version 2 (ECM2.0) was released in August 2021.
[0090] like Figure 3C As shown in , the video encoder 20 (or more specifically, the partitioning unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 3DAs shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding and decoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding and decoding samples of the coding tree block. The coding tree block may be an N×N sample block.
[0091] To achieve better performance, video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 3E As depicted in , a 64×64 CTU 400 is first partitioned into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are partitioned into four CUs of a block size of 16×16, respectively. Two 16×16 CUs 430 and CU 440 are further partitioned into four CUs of a block size of 8×8, respectively. Figure 3F Depicted is a diagram showing Figure 3E The quadtree data structure of the final result of the partitioning process of CTU 400 depicted in FIG. 4 is a quadtree data structure, each leaf node of the quadtree corresponds to a CU of each size ranging from 32×32 to 8×8. Figure 3D Each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding and decoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding and decoding the samples of the coding block. It should be noted that Figure 3E-Figure 3F The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU may be split into CUs based on quadtree / ternary tree / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is divided by a quadtree structure, and each quadtree leaf CU may be further divided by a binary tree structure and a ternary tree structure. Figure 3G-Figure 3K As shown, there are five possible partition types for a coding block with a width of W and a height of H, namely, quadruple partitioning ( Figure 3G ), horizontal binary segmentation ( Figure 3H ), vertical binary segmentation ( Fig. 3I ), horizontal ternary segmentation ( Figure 3J ) and vertical ternary split ( Figure 3K ).
[0092] In some embodiments, the video encoder 20 may further divide the coding block of the CU into one or more M×NPBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.
[0093] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0094] After the video encoder 20 generates the predicted luma block, the predicted Cb block, and the predicted Cr block for one or more PUs of a CU, the 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, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0095] In addition, if Figure 3EAs shown in , the video encoder 20 may use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. A 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. Therefore, each TU of a CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some embodiments, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.
[0096] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.
[0097] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), 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, 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 CABAC on the syntax elements indicating the quantized transform coefficients. Finally, video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in storage device 32 or sent to target device 14.
[0098] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the inverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding samples of the prediction block for the PU of the current CU to corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 may reconstruct the frame.
[0099] As mentioned above, video codecs mainly use two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to codec efficiency than intra-frame prediction because motion vectors are used to predict the current video block from the reference video block.
[0100] However, with the ever-improving video data capture technology and more refined video block sizes for retaining details in the video data, the amount of data required to represent the motion vector of the current frame has also increased significantly. One way to overcome this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial domain and the temporal domain have similar video data for prediction purposes, but the motion vectors between these neighboring CUs are also similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU by exploring the spatial and temporal correlation of the spatially neighboring CUs and / or the temporally co-located CUs, which is also referred to as the "motion vector predictor (MVP)" of the current CU.
[0101] Instead of combining as above Figure 2A The actual motion vector of the current CU determined by the motion estimation unit 42 is encoded into the video bitstream, and the motion vector predictor of the current CU is subtracted from the actual motion vector of the current CU to generate the motion vector difference (MVD) of the current CU. By doing so, the motion vector determined by the motion estimation unit 42 for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent motion information in the video bitstream can be significantly reduced.
[0102] As in the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") of the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or the temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector predictor of the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector predictor in the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor in the motion vector candidate list to encode and decode the current CU.
[0103] The present disclosure focuses on improving the encoding and decoding efficiency of transforms in video encoding and decoding. More specifically, a training and encoding and decoding method for Karhunen-Loève transform (KLT) is proposed. In the following section, related work is first reviewed. Then, the proposed KLT training and signaling method is introduced.
[0104] Large block size transformation with high frequency zeroing
[0105] In VVC, large block size transforms up to 64×64 are enabled, which are mainly used for higher resolution videos, such as 1080p and 4K sequences. For transform blocks with a size (width or height, or both width and height) equal to 64, the high-frequency transform coefficients are zeroed so that only lower frequency coefficients are retained. For example, for an M×N transform block, where M is the block width and N is the block height, when M is equal to 64, only the transform coefficients of the 32 columns on the left are retained. Similarly, when N is equal to 64, only the transform coefficients of the top 32 rows are retained. When the transform skip mode is used for large blocks, the entire block is used without any value being zeroed. In addition, the transform shift is removed in the transform skip mode. VTM also supports a configurable maximum transform size in SPS, allowing the encoder to flexibly select a transform size of up to 32 lengths or 64 lengths according to the needs of a specific implementation.
[0106] Multiple Transform Selection (MTS) for Kernel Transforms
[0107] In addition to DCT-II already adopted in HEVC, the Multiple Transform Selection (MTS) scheme is used for residual coding and decoding of both inter-coded blocks and intra-coded blocks. It uses multiple selected transforms in DCT8 / DST7. The newly introduced transform matrices are DST-VII and DCT-VIII.
[0108] Table 1 shows selected basis functions of DST / DCT.
[0109] To maintain the orthogonality of the transform matrices, the transform matrices are more accurately quantized than in HEVC.To keep the intermediate values of the transformed coefficients within 16 bits, all coefficients will have 10 bits after horizontal transform and after vertical transform.
[0110] Table 1 Transform basis functions of DCT-II / VIII and DSTVII for N-point input
[0111]
[0112] To control the MTS scheme, separate enable flags are specified at the SPS level for intra and inter, respectively. When MTS is enabled at SPS, a CU-level flag is signaled to indicate whether MTS is applied. Here, MTS is applied only to luma. MTS signaling is skipped when one of the following conditions applies.
[0113] 1). The position of the last significant coefficient for the luma TB is less than 1 (ie, DC only)
[0114] 2) The last effective coefficient of brightness TB is located in the MTS zeroing area
[0115] If the MTS CU flag is equal to zero, DCT2 is applied in both directions. However, if the MTS CU flag is equal to one, two other flags are additionally signaled to indicate the transform type for the horizontal and vertical directions, respectively. The transform and signaling mapping table is shown in Table 2. A unified transform selection for ISP and implicit MTS is used by removing intra-mode and block shape dependencies. If the current block is in ISP mode or if the current block is an intra-block and both intra- and inter-frame explicit MTS are turned on, only DST7 is used for both the horizontal transform kernel and the vertical transform kernel. When it comes to transform matrix precision, an 8-bit main transform kernel is used. Therefore, all transform kernels used in HEVC remain the same, including 4-point DCT-2, 4-point DST-7, 8-point DCT-2, 16-point DCT-2 points, and 32-point DCT-2. In addition, other transform cores including 64-point DCT-2, 4-point DCT-8, 8-point DST-7, 8-point DCT-8, 16-point DST-7, 16-point DCT-8, 32-point DST-7, and 32-point DCT-8 use an 8-bit main transform core.
[0116] Table 2 Transformation and signaling mapping table
[0117]
[0118] To reduce the complexity of large-size DST-7 and DCT-8, high-frequency transform coefficients are zeroed for DST-7 blocks and DCT-8 blocks of size (width or height, or both) equal to 32. Only coefficients in the 16×16 low-frequency region are retained.
[0119] In HEVC, for example, the residual of a block can be coded or decoded using the transform skip mode. To avoid redundancy in syntax coding, when the MTS_CU_flag at the CU level is not equal to zero, the transform skip flag is not signaled. Note that when LFNST or MIP is activated for the current CU, the implicit MTS transform is set to DCT2. In addition, when MTS is enabled for an inter-coded block, the implicit MTS can still be enabled.
[0120] Low-frequency Non-separable Transform (LFNST)
[0121] In VVC, LFNST is applied between the forward main transform and quantization (at the encoder side) and between the inverse quantization and inverse main transform (at the decoder side), as Figure 4 shown. In LFNST, a 4×4 non-separable transform or an 8×8 non-separable transform is applied according to the block size. For example, 4×4 LFNST is applied to small blocks (i.e., min(width, height) < 8), and 8×8 LFNST is applied to larger blocks (i.e., min(width, height) > 4).
[0122] Using the input as an example, the application of the non-separable transform used in LFNST is described as follows. To apply 4×4 LFNST, first represent the 4×4 input block X as a vector
[0123]
[0124] The non-separable transform is calculated as where denotes the transform coefficient vector, and T is a 16×16 transform matrix. Subsequently, the 16×1 coefficient vector is reorganized into a 4×4 block using the scan order (horizontal, vertical, or diagonal) of the block. Coefficients with smaller indices are placed in the 4×4 coefficient block together with smaller scan indices.
[0125] Reduced non-separable transform
[0126] LFNST (Low-Frequency Non-Separable Transform) applies the non-separable transform based on a direct matrix multiplication method such that LFNST can be implemented in a single pass without multiple iterations. However, it is necessary to reduce the dimension of the non-separable transform matrix to minimize the computational complexity and the memory space for storing the transform coefficients. Therefore, the reduced non-separable transform (or RST) method is used in LFNST. The main idea of the reduced non-separable transform is to map an N-dimensional vector (for 8×8 NSST, N is usually equal to 64) to an R-dimensional vector in a different space, where N / R (R < N) is the reduction factor. Thus, instead of an N×N matrix, the RST matrix becomes an R×N matrix as follows:
[0127]
[0128] Wherein the R rows of the transform are the R bases of the N-dimensional space. The inverse transform matrix for RT is the transpose of its forward transform. For 8×8 LFNST, a reduction factor of 4 is applied, and the 64×64 direct matrix (which is the size of the conventional 8×8 inseparable transform matrix) is reduced to a 16×48 direct matrix. Therefore, a 48×16 inverse RST matrix is used on the decoder side to generate the core (main) transform coefficients in the 8×8 upper left region. When a 16×48 matrix is applied instead of a 16×64 with the same transform set configuration, each 16×48 matrix obtains 48 input data from three 4×4 blocks in the upper left 8×8 block (excluding the lower right 4×4 block). With the reduced dimension, the memory usage for storing all LFNST matrices is reduced from 10KB to 8KB with a reasonable decrease in performance. In order to reduce complexity, LFNST is limited to being applicable only when all coefficients outside the first coefficient subgroup are ineffective. Therefore, when LFNST is applied, all main transform coefficients must be zero. This allows adjustments to the LFNST index signaling at the last significant position and thus avoids the additional coefficient scans in the current LFNST design, which are required to check significant coefficients only at specific positions. The worst-case processing of LFNST (in terms of per-pixel multiplications) limits the inseparable transforms for 4×4 blocks and 8×8 blocks to 8×16 transforms and 8×48 transforms, respectively. In these cases, when LFNST is applied, the last significant scan position must be less than 8 for other sizes less than 16. For blocks of shape 4×N and N×4 with N≥8, the proposed restrictions mean that LFNST is now applied only once and only to the upper left 4×4 region. Since all the main-only coefficients are zero when LFNST is applied, the number of operations required for the main transform is reduced in this case. From the encoder perspective, the quantization of coefficients is significantly simplified when testing the LFNST transform. For the first 16 coefficients (in scan order), rate-distortion optimized quantization must be performed to the greatest extent possible, and the remaining coefficients are forced to zero.
[0129] LFNST Transform Selection
[0130] In LFNST, there are a total of 4 transform sets, and each transform set uses 2 inseparable transform matrices (kernels). The mapping from intra prediction modes to transform sets is predefined, as shown in Table 3-10. If one of the three CCLM modes (INTRA_LT_CCLM, INTRA_T_CCLM, or INTRA_L_CCLM) is used for the current block (81 <= predModeIntra <= 83), transform set 0 is selected for the current chroma block. For each transform set, the selected inseparable secondary transform candidate is further specified by an explicitly signaled LFNST index. After the transform coefficients, the index is signaled once in the bitstream per intra CU.
[0131] Table 3 Transformation selection table
[0132] Intra prediction mode Transform Set Index Intra prediction mode < 0 1 0<=intra prediction mode<=1 0 2<=intra prediction mode<=12 1 13<=intra prediction mode<=23 2 24<=Intra-frame prediction mode<=44 3 45<=Intra-frame prediction mode<=55 2 56<=Intra-frame prediction mode<=80 1 81<=Intra-frame prediction mode<=83 0
[0133] LFNST index signaling and interaction with other tools
[0134] Since LFNST is restricted to being applicable only when all coefficients outside the first coefficient subgroup are insignificant, the LFNST index encoding depends on the position of the last significant coefficient. In addition, the LFNST index is context-encoded but does not depend on the intra prediction mode, and only the first binary bit is context-encoded. In addition, LFNST is applied to intra CUs in both intra and inter slices, and to both luma and chroma. If dual tree is enabled, LFNST indexes for luma and chroma are signaled separately. For inter slices (dual tree is disabled), a single LFNST index is signaled and used for both luma and chroma.
[0135] Considering that large CUs larger than 64×64 are implicitly partitioned (TU tiling) due to the existing maximum transform size limit (64×64), LFNST index search may increase the data buffer by four times for a certain number of decoding pipeline stages. Therefore, the maximum size allowed for LFNST is limited to 64×64. It should be noted that LFNST is enabled only with DCT2. LFNST index signaling is placed before MTS index signaling.
[0136] Using a scaling matrix for perceptual quantization does not make it obvious that the scaling matrix specified for the main matrix is useful for the LFNST coefficients. Therefore, using a scaling matrix on the LFNST coefficients is not allowed. For single-tree partitioning mode, chroma LFNST is not applied.
[0137] LFNST training
[0138] The codec efficiency of LFNST is highly dependent on the design of the LFNST kernel, which is derived through offline training. The training process can be considered as a clustering problem, where each cluster represents a huge group of transform coefficient blocks obtained from the actual encoding process, and the "center of mass" of each cluster is the optimal inseparable transform for the associated transform coefficient blocks in the same cluster, i.e., KLT.
[0139] Inspired by the classic k-means clustering method, the training of LFNST is performed in a two-stage iterative manner with an initial state:
[0140] initialization
[0141] For each transform coefficient block collected from the encoding process, a random label ranging from 0 to 3 is assigned. The low-frequency M×N coefficients are then added as one training data in the cluster associated with the assigned label.
[0142] For each cluster labeled from 1 to 3, the optimal inseparable transformation is derived by solving the eigenvectors of the covariance matrix (e.g., singular value decomposition (SVD)), where the covariance matrix is calculated using the training data in the same cluster. In addition, the identity transformation indicating that no secondary transformation is applied is assigned as the centroid of the first cluster.
[0143] Iteration
[0144] For each available training data, rate-distortion optimization is used to select the optimal transformation kernel, and the training data is relabeled using the selected transformation kernel.
[0145] With the updated labels for each training example, each cluster is updated and the “centroid” (transform kernel) of the clusters labeled from 1 to 3 is updated accordingly. The identity transform is always assigned to cluster 0.
[0146] Subblock Transform (SBT)
[0147] In VTM, sub-block transform is introduced for inter-predicted CU. In this transform mode, only a sub-part of the residual block is encoded and decoded for the CU. When the inter-predicted CU has cu_cbf equal to 1, cu_sbt_flag can be signaled to indicate whether the entire residual block is encoded and decoded or a sub-part of the residual block is encoded and decoded. In the former case, the intra-MTS information is further parsed to determine the transform type of the CU. In the latter case, a part of the residual block is encoded and decoded using the inferred adaptive transform, and the other part of the residual block is reset to zero.
[0148] When SBT is used for an inter-coded CU, the SBT type and SBT position information are signaled in the bitstream. There are two SBT types and two SBT positions, such as Figure 5A-5D As shown. For SBT-V (or SBT-H), the TU width (or height) can be equal to half of the CU width (or height) or 1 / 4 of the CU width (or height), resulting in 2:2 partitioning or 1:3 / 3:1 partitioning. The 2:2 partitioning is similar to the binary tree (BT) partitioning, while the 1:3 / 3:1 partitioning is similar to the asymmetric binary tree (ABT) partitioning. In the ABT partitioning, only small areas contain non-zero residuals. If one dimension of the CU is 8 luminance samples, 1:3 / 3:1 partitioning is not allowed along the dimension. For a CU, there are up to 8 SBT modes.
[0149] Position-dependent transform kernel selection is applied to the luma transform blocks in SBT-V and SBT-H (chroma TBs of DCT-2 are always used). The two positions of SBT-H and SBT-V are associated with different kernel transforms. More specifically, Figure 5A-5D The horizontal and vertical transforms for each SBT position are specified in . For example, the horizontal and vertical transforms for SBT-V position 0 are DCT-8 and DST-7, respectively. When one side of the residual TU is greater than 32, the transforms for both dimensions are set to DCT-2. Therefore, the sub-block transform jointly specifies the TU partitioning, cbf, and horizontal and vertical kernel transform types of the residual block.
[0150] SBT is not applied to CUs coded in combined inter-intra mode.
[0151] Transform improvements in ECM
[0152] Maximum transform size and zeroing of transform coefficients
[0153] Both the CTU size and the maximum transform size (i.e., all MTS transform kernels) are extended to 256, where the largest intra-coded block can have a size of 128×128. The maximum CTU size is set to 256 for UHD sequences and to 128 in other cases. During the main transform process, there is no normalized zeroing operation applied to the transform coefficients. However, if LFNST is applied, the main transform coefficients outside the LFNST region are normalized to zero.
[0154] Enhanced MTS for intra-frame coding and decoding
[0155] In the current VVC design, for MTS, only the DST7 transform core and the DCT8 transform core used for intra-frame coding and inter-frame coding are utilized.
[0156] Additional main transforms including DCT5, DST4, DST1 and identity transform (IDT) are adopted. In addition, the MTS set depends on the TU size and intra-frame mode information. 16 different TU sizes are considered, and for each TU size, 5 different categories are considered according to the intra-frame mode information. For each category, 1, 4 or 6 different transform pairs are considered. The number of intra-frame MTS candidates is adaptively selected (between 1, 4 and 6 MTS candidates) based on the sum of the absolute values of the transform coefficients. The sum is compared with two fixed thresholds to determine the total number of allowed MTS candidates:
[0157] 1 candidate: sum <= th0
[0158] 4 candidates: th0 <sum<=th1
[0159] 6 candidates: sum>th1
[0160] Note that although a total of 80 different classes are considered, some of these different classes often share exactly the same set of transforms. Thus, there are 58 (less than 80) unique entries in the resulting LUT.
[0161] For angular modes, the joint symmetry of TU shape and intra prediction is taken into account. Therefore, mode i (i>34) with TU shape A×B will be mapped to the same category as mode j=(68-i) with TU shape B×A. However, for each transform pair, the order of the horizontal transform kernel and the vertical transform kernel is swapped. For example, a 16×4 block with mode 18 (horizontal prediction) and a 4×16 block with mode 50 (vertical prediction) are mapped to the same category. However, the vertical transform kernel and the horizontal transform kernel are swapped.
[0162] For wide angle modes, the closest normal angle mode is used for transform set determination. For example, mode 2 is used for all modes between -2 and -14. Similarly, mode 66 is used for modes 67 to 80.
[0163] LFNST extension with large core
[0164] The LFNST design in VVC is extended as follows:
[0165] The number of LFNST sets (S) and the number of candidates (C) are extended to S=35 and C=3, and the LFNST set (lfnstTrSetIdx) for a given intra mode (predModeIntra) is derived according to the following formula:
[0166] For predModeIntra<2, lfnstTrSetIdx is equal to 2
[0167] For predModeIntra in [0, 34], lfnstTrSetIdx = predModeIntra
[0168] For predModeIntra in [35, 66], lfnstTrSetIdx=68-predModeIntra
[0169] Three different kernels LFNST4, LFNST8, and LFNST16 are defined to indicate LFNST kernel sets, which are applied to 4×N / N×4 (N≥4), 8×N / N×8 (N≥8), and M×N (M, N≥16), respectively.
[0170] The kernel dimension is specified by:
[0171] (LFSNT4, LFNST8*, LFNST16*) = (16×16, 32×64, 32×96)
[0172] Positive LFNST is applied to the upper left low frequency region, which is called the region of interest (ROI). When LFNST is applied, the main transform coefficients present in the region except the ROI are zeroed, which is consistent with the VVC standard.
[0173] exist Figure 6 The ROI for LFNST16 is described in
[15] . It consists of six 4×4 sub-blocks that are consecutive in scan order. Since the number of input samples is 96, the transform matrix for positive LFNST16 can be R×96. In this paper, R is chosen to be 32, and accordingly 32 coefficients (two 4×4 sub-blocks) are generated from positive LFNST16, which are placed in coefficient scan order.
[0174] exist Figure 7 The ROI for LFNST8 is shown in . A positive LFNST8 matrix may be R x 64, and R is chosen to be 32. The generated coefficients are positioned in the same way as for LFNST16.
[0175] The mapping from intra prediction modes to these sets is shown in Table 4.
[0176] Table 4 Mapping of intra prediction mode (Intra pred.mode) to LFNST set index (LFNST set index)
[0177] Intrapred.mode -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 LFNST setindex 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Intrapred.mode 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 LFNST setindex 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 Intrapred.mode 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 LFNST setindex 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[0178] Signal-dependent transformations in JEM Change (Signa l Dependent Transform, SDT)
[0179] Considering that there are many similar image patches within and across frames, a signal-dependent transform that exploits this correlation can enhance the codec performance through KLT. The trained KLT acts as a transform that aims to compress energy more efficiently.
[0180] Figure 8 The flowchart in describes this idea. For the current coding block indicated by C, first, obtain the top left template t reconstructed by the coding block b The reference image block R is composed of the N most similar image blocks and the prediction block p. This reference image block is then used to search for the N most similar image blocks on the reconstructed area. Finally, a one-dimensional KLT based on these blocks and the prediction block is calculated. For the set of similar candidate blocks, the coded block is unknown at the decoder. The prediction block and the reconstruction template are used to guide the search for similar blocks instead of using the original block. The tool is used for various block sizes 4×4, 8×8, 16×16 and 32×32.
[0181] It is known that the Karhunen-Loéve transform (KLT) is the best transform in terms of energy compression efficiency. By searching on the reconstructed area, the N blocks x that are most similar to the reference image block are obtained. i , i = 1, 2, ..., N. Here, x i =(x i1 , x i2 , ..., x iD ) T And D indicates the vector dimension which is the transform block size. For example, for a 4×4 coding block, N is 16. Subtract the prediction p from those blocks and obtain the residual block u i , i = 1, 2, ..., N, where Therefore, these residual blocks are used as training samples with zero mean for KLT derivation. These N training samples can be used as U = (u1, u2, ..., u N ), which is a D×N matrix. Consider the covariance matrix Σ given by:
[0182] ∑=UU T (3-4)
[0183] where the dimension of the covariance matrix is D×D. The KLT basis is the eigenvector of the covariance matrix. For natural image / video content, we found that choosing the number of candidates N to be 100 is sufficient for good performance.
[0184] The computational complexity of eigenvalue decomposition is O(D 3 ). For a 4×4 block with D=16, the complexity is O(16 3), which is acceptable. For large blocks, the complexity will be very high. For a 32×32 block with D=1024, the time complexity will be 262144 times slower than that of a 4×4 block, which is intolerable in the codec framework.
[0185] With this in mind, a fast algorithm is used to make KLT feasible for large block sizes. The dimension of Σ is D × D. However, U T U has a much lower dimension, such as N × N. We calculate Σ′ = U T The eigenvector φ of U satisfies the following equation:
[0186] U T Uφ=φΛ (3-5)
[0187] φ denotes the eigenvector matrix, and Λ denotes the diagonal matrix with eigenvalues as diagonal elements. Let us multiply both sides of Equation 33 by U to obtain:
[0188] UU T Uφ=UφΛ (3-6)
[0189] Add parentheses to this equation and obtain:
[0190] (UU T )(Uφ)=(Uφ)Λ (3-7)
[0191] The column vector of Uφ is UU T The eigenvectors of , whose corresponding eigenvalues are the diagonal elements of the matrix Λ. Let This indicates that the covariance matrix U can be obtained by dividing U by T The high-dimensional covariance matrix U is obtained by multiplying the eigenvector φ obtained by U T The eigenvector of U. The dimensions of and Λ are both D×N. T All other (DN) eigenvectors of have zero eigenvectors. We can use the Schmidt orthogonalization method to fill the (DN) eigenvectors to obtain a D×D eigenvector matrix.
[0192] To reduce the complexity of matrix multiplication, the KLT transform can be performed using the obtained N eigenvectors, leaving the remaining (DN) transform coefficients as zero. This will not degrade the performance because the first N projections can cover most of the signal energy while training the basis from samples that are highly correlated with the coded block.
[0193] In JEM, the described KLT is implemented on coding blocks at block level. In order to have high adaptability to image / video content, the proposed scheme supports the proposed KLT on 4×4 coding blocks, 8×8 coding blocks, 16×16 coding blocks and 32×32 coding blocks. On the JEM encoder side, rate-distortion optimization is used to determine the transform mode between SDT and adaptive multiple transform (AMT).
[0194] The transforms in VVC and ECM have been designed more efficiently than those in HEVC in terms of both transform kernel and signaling methods. In the past decade, more methods have been proposed to further improve the transform codec performance, including MTS, LFNST, SDT, etc. However, there are still several shortcomings in these methods.
[0195] In current VVC and ECM, the main transform kernel is derived from the DCT formula and the DST formula. However, the derived transform kernel may not be suitable for all video contents with different characteristics. Therefore, there is still a need to study more effective transform kernels.
[0196] In current VVC and ECM, the transformation matrix in LFNST is actually the trained KLT. However, LFNST is only applied to the secondary transform. The KLT in the primary transform is not considered.
[0197] The signal dependent transform (SDT) in JEM can achieve significant codec gain. However, the KLT matrix in SDT needs to be derived online at both the encoder and decoder sides through template matching. The complexity of template matching and eigenvalue decomposition is unacceptable especially for the decoder.
[0198] In order to train KLT, training data must first be collected. In SDT (online KLT training), training data is collected by template matching at both the encoder side and the decoder side, which is too complicated. In LFNST, all transform blocks with different block sizes are first collected, and then these blocks are divided into K groups using a clustering method. A KLT matrix is then derived for each group. In video coding and decoding, an index is signaled for each CU to indicate which transform matrix to use, that is, which group the current transform block belongs to. This method may have two disadvantages. First, training data classification is to divide the training data into different groups to ensure that the training samples in a group meet the same statistical characteristics. However, the classification of training data in LFNST may not be accurate enough. Secondly, the index signaled at the CU level also brings additional overhead bits.
[0199] In current VVC and ECM, the transform kernel is fixed and cannot adapt to the non-stationary characteristics of video content.
[0200] In current video codec standards, forward and inverse transforms share the same transform matrix to ensure complete reconstruction. However, due to the quantization of transform coefficients, complete reconstruction cannot be guaranteed and transform matrix sharing may not lead to optimal compression performance.
[0201] In order to solve the above-mentioned problems of KLT in video coding and decoding, several methods are proposed to improve the performance of KLT in video coding and decoding. The present disclosure proposes an offline training KLT method for main transform. In order to improve the performance of trained KLT, a more effective transformation block (including training data) classification method is proposed. For different video statistical characteristics, a KLT matrix adaptive signaling method is also proposed. In order to deal with the quantization effect of transform coefficients, an asymmetric KLT is proposed, in which different transform matrices can be used for the forward transform and the inverse transform.
[0202] Introduction to KLT
[0203] KLT is an orthogonal transform based on the statistical characteristics of the signal, which can achieve the optimal transformation gain in terms of mean square error (MSE) metric. Let the input vector be x and the output vector of KLT be X. The correlation between any two elements in X is zero, that is,
[0204]
[0205] The above equation (5-1) is further converted into the following form:
[0206]
[0207] If we assume that the input vector x is a zero-mean variable, then Equation (5-2) is converted to:
[0208] E[X[u1]X[u2]]=0 (5-3)
[0209] In this disclosure, the KLT matrix is denoted as K, and the transformation can be described as follows:
[0210] X=Kx(5-4)
[0211] The covariance matrix of X can be described as:
[0212] E[XX T ]=E[Kxx T K T ]=KE[xx T ]K T =KCK T (5-5)
[0213] Where C is the covariance matrix of the input vector. To ensure that E[X[u1]X[u2]] = 0, E[XXT ] must be a diagonal matrix. In other words, the matrix K must transform the matrix C into a diagonal matrix. That is, the row vectors of the matrix K are the eigenvectors of the matrix C.
[0214] KLT train
[0215] In order to derive the KLT of a signal, the statistical properties, i.e., the covariance matrix of the signal, should be known. However, in practice, it is difficult to obtain the covariance matrix of the signal because the probability distribution is not available. Therefore, in practical applications, KLT derivation is usually based on training from data. There are several problems in the derivation of KLT based on training.
[0216] The first question is how to derive the corresponding KLT matrix given a training set.
[0217] The second problem is how to collect and classify training samples into different groups in which the training samples share the same statistical distribution.
[0218] KLT training method
[0219] In the present disclosure, KLT can be trained using singular value decomposition (SVD) or eigenvalue decomposition given the training data. First, assume that we have collected a training dataset with zero mean for KLT, which consists of N blocks x i (i=1,2,...,N), where x i =(x i1 , ..., x iD ) T And D represents the dimension of the vector, which is just the transform block size. The training samples are normalized to Then, we use these residual blocks as training samples with zero mean for deriving KLT. These N training samples can be used as U = (u1, ..., u N ), which is a D×N matrix. We denote the covariance matrix Σ of those training blocks as:
[0220] ∑=UU T (5-6)
[0221] The dimension of Σ is D × D. The relationship between the covariance matrix and its eigenvectors is:
[0222] ∑Ψ=ΨΛ (5-7)
[0223] Where Ψ is the transformation matrix, where the column vectors are the eigenvectors (KLT basis), and Λ is a diagonal matrix where the diagonal elements are the eigenvalues. The eigenvectors can be obtained by performing eigenvalue decomposition or SVD on the covariance matrix. Note that we have sorted the eigenvalues along with the eigenvectors in descending order of the eigenvalues. This is to make the energies of the transform coefficients have a descending order corresponding to the training samples.
[0224] Training data clustering
[0225] In the proposed KLT training method, the samples are transformed blocks obtained from the encoding process. These samples are then clustered into different groups and each KLT matrix is derived for each group.
[0226] In an embodiment, the training samples are clustered based on the transformed block size. For example, for each block size, a KLT matrix is derived.
[0227] In another embodiment, for intra prediction, training samples are clustered based on transform block size and intra mode. For example, for each transform block size, a set of KLT matrices is derived, where one intra mode corresponds to one KLT matrix or several intra modes share one KLT matrix.
[0228] In this embodiment, for inter prediction, the training samples are clustered based on transform block size and AMVR mode. For example, for each transform block size, a set of KLT matrices is derived, where one AMVR mode corresponds to one KLT matrix.
[0229] In another embodiment, for inter-frame prediction, the training samples are clustered based on the transform block size and the absolute value of the motion vector (MV). Several thresholds th1, th2, ..., th M To classify the motion vector. For example, for each transform block size, a set of KLT matrices is derived, where one absolute value range of the motion vector corresponds to one KLT matrix. Here, the motion vector used for classification is the maximum value of the horizontal MV and vertical MV values for both unidirectional prediction and bidirectional prediction.
[0230] In another embodiment, for inter-frame prediction, the training samples are clustered based on the transform block size, prediction mode and neighboring template. It should be noted that for intra-frame prediction, the prediction mode here refers to the intra-frame direction. For inter-frame prediction, the prediction mode refers to the AMVR mode or the motion vector value or the inter-frame prediction direction, etc. Fig. 9 An example template for a particular transform block size used in this embodiment is shown, consisting of N rows and N columns of reconstructed pixels.
[0231] An example training process is shown below. In the training set for each transform block size and prediction mode, the neighboring templates are divided into K clusters using classic k-means clustering based on a specific distance metric, including but not limited to the sum of squared errors (SSE) and the sum of absolute errors (SAD). Then, for each transform block size and prediction mode, K template centers are derived and fixed at both the encoder and the decoder, as Fig.10 For each (transform block size, prediction mode, template center), a training set is obtained and the corresponding KLT matrix is derived.
[0232] During encoding and decoding, for each transform block, a KLT transform set is first selected based on its block size and prediction mode. Then the distance between the template of the current block and the K template centers is calculated. The template center that results in the minimum distance is selected, and the corresponding KLT matrix is used for the current transform block.
[0233] In another embodiment, the method proposed in embodiment 4 is extended. In embodiment 4, for each (transform block size, prediction mode, template center), a KLT matrix is derived. In this embodiment, for each (transform block size, prediction mode, template center), the training set is further divided into several groups using classic k-means clustering as LFNST. During encoding and decoding, for each (transform block size, prediction mode, template center) pair, a transform matrix set is selected, and an index is used to further indicate which transform matrix in the transform matrix set is used for the current block.
[0234] KLT signaling in video codecs
[0235] QP Depends on the Main Transform
[0236] In the present disclosure, a QP-dependent main transform is proposed. In the current VVC, ECM and KLT transform methods, the main transform is QP-independent, that is, blocks with different QPs share the same transform matrix. In the present disclosure, it is proposed to use different KLT transforms for different QPs. The KLT training process is described as follows.
[0237] First, training data is collected using different QPs from the encoding process.
[0238] Second, for each QP, the KLT matrix is derived using the corresponding training set using the method introduced in the KLT training section.
[0239] During the encoding and decoding process, for each transform block, in addition to the transform block size, prediction mode and neighboring templates, the encoder or decoder also uses its QP value to select the corresponding transform matrix.
[0240] Asymmetric KLT
[0241] In a common KLT, the forward transform and the inverse transform share the same transform matrix to ensure the complete reconstruction characteristics of the signal. However, in video / image coding, the transform coefficients are quantized using a specific quantization parameter (QP) after the transform. Therefore, the original signal cannot be completely reconstructed. To solve this problem, an asymmetric KLT is proposed in the present disclosure, in which the forward transform and the inverse transform can use different transform matrices.
[0242] In a first embodiment, transform units with the same size but encoded using different QPs share the same positive KLT matrix, but use different inverse KLT matrices. An example method for deriving the positive KLT matrix and the inverse KLT matrix is introduced as follows.
[0243] In the first step, for each TU size, a KLT matrix is derived for all QP values according to the KLT training method described above. In this step, the derived forward KLT matrix and inverse KLT matrix share the same parameters.
[0244] In the second step, the KLT matrix derived in the first step is integrated into the video codec, and information of TUs using KLT is collected as training data used in the following steps, including QP values, original residuals, and quantized transform blocks.
[0245] In the third step, the inverse KLT matrix is refined for each QP value or QP value range. The original residual and the quantized transform block for a specific QP value or QP value range are represented as {r1, r2, ..., r N}and The refinement of the inverse KLT matrix InvT can be described as follows.
[0246]
[0247] In a second embodiment, transform units with the same size but encoded using different QPs share the same inverse KLT matrix, but use different forward KLT matrices.
[0248] In a third embodiment, transform units with the same size may use separate pairs of positive KLT matrices and inverse KLT matrices for different QPs, where the positive matrix and the inverse matrix in each pair may have different matrix elements.
[0249] According to one or more embodiments of the asymmetric KLT, several QP thresholds may be set for each TU size: QP1, QP2, ..., QP K These QP thresholds divide the QP values into K+1 ranges, and for each QP range, a set of positive KLT matrices / inverse KLT matrices are derived and applied.
[0250] KLT signaling in video codecs
[0251] KLT as an additional main transform
[0252] In the present disclosure, it is proposed to use KLT as an additional primary transform. First, the MTS CU flag is signaled to indicate whether MTS is used for the current CU. If the MTS CU flag is true, the KLT CU flag is signaled to indicate whether KLT is used as the primary transform for the CU. If the MTS CU flag is true and the KLT CU flag is false, the transform pair in the current VVC or ECM is utilized.
[0253] Advanced KLT Matrix Signaling
[0254] In the above part, training method and block level signaling method are proposed and described.More specifically, the trained KLT matrix is all fixed at encoder and decoder.In practical applications, the statistical characteristics of video content are usually time-varying, that is, for different frames or video sequences, the statistical characteristics can be changed.Under these circumstances, the fixed KLT matrix is difficult to achieve optimal compression efficiency.In order to solve this problem of the fixed KLT matrix, a high-level adaptive KLT matrix signaling method is proposed in the present disclosure.
[0255] In a first aspect, it is proposed to adaptively signal the KLT matrix in a sequence parameter set (SPS). At the encoder side, the KLT matrix is derived for the sequence. The KLT matrix is then signaled in the SPS header.
[0256] In a second aspect, it is proposed to adaptively signal the KLT matrix in a picture parameter set (PPS). At the encoder side, the KLT matrix is derived for each picture. The KLT matrix is then signaled in a PPS header.
[0257] In a third aspect, it is proposed to adaptively signal the KLT matrix in the slice header. At the encoder side, the KLT matrix is derived for each slice. The KLT matrix is then signaled in the slice header.
[0258] It should be noted that two methods are proposed in this disclosure to encode and decode the elements in the KLT matrix.
[0259] In the first method, a typical code (ie, Exponential Golomb (EG) code) is used to directly encode and decode the elements in the KLT matrix.
[0260] In the second method, a fixed KLT matrix is used to predict an adaptive KLT matrix, and then the residual of the KLT matrix is further signaled using a typical code.
[0261] In the present disclosure, methods and devices for deriving KLT matrices and applying these new matrices in video codecs are proposed. First, an algorithm for KLT training is introduced. Secondly, an improved KLT training data clustering method is proposed. Secondly, a signaling method for KLT in video codecs is proposed. Thirdly, an asymmetric KLT method is proposed to handle the quantization effect of transform coefficients. Finally, a signaling method for advanced KLT matrices is proposed. It is expected to further improve the codec efficiency of transform codecs in VVC and ECM.
[0262] Fig.11 A computing environment 1110 coupled to a user interface 1150 is shown. The computing environment 1110 may be part of a data processing server. The computing environment 1110 includes a processor 1120, a memory 1130, and an input / output (I / O) interface 1140.
[0263] The processor 1120 generally controls the overall operation of the computing environment 1110, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1120 may include one or more processors to execute instructions to perform all or some steps in the above method. In addition, the processor 1120 may include one or more modules that facilitate interaction between the processor 1120 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.
[0264] The memory 1130 is configured to store various types of data to support the operation of the computing environment 1110. The memory 1130 may include predetermined software 1132. Examples of such data include instructions for any application or method operating on the computing environment 1110, video data sets, image data, etc. The memory 1130 may be implemented by using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0265] The I / O interface 1140 provides an interface between the processor 1120 and peripheral interface modules such as a keyboard, a click wheel, buttons, etc. The buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. The I / O interface 1140 may be coupled to an encoder and a decoder.
[0266] In an embodiment, a non-transitory computer-readable storage medium including a plurality of programs is also provided, wherein the plurality of programs are, for example, in the memory 1130 and can be executed by the processor 1120 in the computing environment 1110 to perform the above method and / or store the bit stream generated by the above encoding method or the bit stream to be decoded by the above decoding method. In one example, the plurality of programs can be executed by the processor 1120 in the computing environment 1110 to receive (for example, from Figure 2A The video encoder 20 in the computing environment 1110 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1120 in the computing environment 1110 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1120 in the computing environment 1110 to perform the above-mentioned encoding method, encode the video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1120 in the computing environment 1110 to send a bitstream or data stream (e.g., to a Figure 3A Optionally, the non-transitory computer-readable storage medium may store therein a bitstream or data stream, the bitstream or data stream comprising the video decoder 30 in the encoder (e.g., Figure 2A The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 3A The video decoder 30 in the video decoder 30) in decoding the video data (e.g., video blocks representing encoded video frames and / or associated one or more syntax elements, etc.). The non-transitory computer-readable storage medium can be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0267] In an embodiment, a bitstream generated by the above encoding method or a bitstream to be decoded by the above decoding method is provided. In an embodiment, a bitstream is provided, which includes the encoded video information generated by the above encoding method or the encoded video information to be decoded by the above decoding method.
[0268] In an embodiment, a computing device is also provided, which includes one or more processors (e.g., processor 1120); and a non-transitory computer-readable storage medium or memory 1130 having stored therein a plurality of programs executable by the one or more processors, wherein the one or more processors are configured to perform the above-mentioned method when executing the plurality of programs.
[0269] In an embodiment, a computer program product having instructions is also provided, wherein the instructions are used to store or send a bitstream, the bitstream including the encoded video information generated by the above encoding method or the encoded video information to be decoded by the above decoding method. In an embodiment, a computer program product including multiple programs is also provided, wherein the multiple programs are, for example, in the memory 1130 and can be executed by the processor 1120 in the computing environment 1110 to perform the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.
[0270] In an embodiment, the computing environment 1110 may be implemented using one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0271] In an embodiment, a method for storing a bitstream is also provided, comprising storing the bitstream on a digital storage medium, wherein the bitstream comprises the encoded video information generated by the above encoding method or the encoded video information to be decoded by the above decoding method.
[0272] In an embodiment, a method for transmitting a bit stream generated by the above encoder is also provided. In an embodiment, a method for receiving a bit stream to be decoded by the above decoder is also provided.
[0273] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limiting of the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.
[0274] Unless otherwise specifically stated, the order of the method steps according to the present disclosure is intended to be illustrative only, and the method steps according to the present disclosure are not limited to the order specifically described above, but may be changed according to actual conditions. In addition, at least one of the method steps according to the present disclosure may be adjusted, combined or deleted according to actual requirements.
[0275] The examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the intended specific use. Therefore, it should be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.
[0276] Fig.12 1 is a flow chart showing a method for video decoding according to an example of the present disclosure. The method is implemented by a decoder.
[0277] In step 1201, the processor 1120 at the decoder side may determine an inverse transform kernel for a residual block corresponding to a current decoding block. In some embodiments, the inverse transform kernel / forward transform kernel may be a KLT matrix.
[0278] In step 1202, the processor 1120 of the decoder may determine a reconstructed block based on an inseparable transform kernel, a residual block, and a current decoded block, wherein the inverse transform kernel is different from the forward transform kernel used to transform the residual block during the encoding process. In this case, an asymmetric transform is provided at the decoding side and the encoding side, respectively, in the present disclosure, wherein the forward transform and the inverse transform use different transform matrices.
[0279] In some embodiments, residual blocks with the same first attribute and different second attributes may have the same forward transform kernel and different inverse transform kernels. In some other embodiments, residual blocks with the same first attribute and different second attributes may have the same inverse transform kernel and different forward transform kernels.
[0280] In some embodiments, the first attribute may include a block size and the second attribute may include a quantization parameter or a quantization parameter range.
[0281] In some embodiments, the processor 1120 of the decoder may determine an inverse transform kernel from an inverse transform kernel set according to the property information of the residual block, wherein the inverse transform kernel set is trained offline based on sample blocks collected offline.
[0282] In some embodiments, the inverse transform kernel set may be obtained by the device. Fig.13 As shown in , the device can implement the following steps to train the inverse transform kernel set.
[0283] In step 1301, the device may collect sample blocks offline. In some embodiments of the present disclosure, the sample blocks may be residual blocks obtained offline based on original sample data to be encoded.
[0284] In step 1302 , the device may cluster the sample blocks into a plurality of block groups offline according to the attribute information of each sample block.
[0285] In step 1303, the device may train an inverse transform kernel set offline based on multiple block groups, wherein the inverse transform kernel set includes multiple inverse transform kernels corresponding to the multiple block groups respectively. For example, each inverse transform kernel may be obtained by deriving a transformation matrix Ψ based on equations (5-7). The column vector of the transformation matrix Ψ is an eigenvector that can be obtained by performing eigenvalue decomposition or SVD on the covariance matrix Σ.
[0286] In some embodiments, the attribute information may include block size, and may also include any one or any combination of an adaptive motion vector resolution (AMVR) mode, an absolute value of a motion vector, a prediction mode, a neighboring template, a quantization parameter (QP) value, or a QP range for collecting each sample block.
[0287] In some embodiments, residual blocks with the same block size and different quantization parameters or quantization parameter ranges have the same forward transform kernel and different inverse transform kernels, and the processor 1120 of the decoder may determine the inverse transform kernel from the inverse transform kernel set according to the quantization parameter or quantization parameter range of the residual block, wherein the inverse transform kernel set is trained offline based on sample blocks collected offline.
[0288] In some embodiments, the inverse transform kernel set may be obtained by the device. The device may collect sample residual blocks and sample quantized transform blocks offline; cluster the sample residual blocks offline into multiple block groups according to the quantization parameter (QP) or quantization parameter range of each sample residual block; and train the inverse transform kernel set offline based on the multiple block groups; wherein the inverse transform kernel set includes multiple inverse transform kernels corresponding to the multiple block groups, respectively. For example, as shown in equation (6-1), for a specific QP value or QP value range, the sample residual block and the sample quantized transform block (represented as {r1, r2, ..., r N}and ) is used to obtain the inverse transform kernel InvT.
[0289] Fig.14 1 is a flow chart showing a method for video encoding according to an example of the present disclosure. The method is implemented by an encoder.
[0290] In step 1401, the processor 1120 at the encoder side may determine a forward transform kernel for a residual block corresponding to a current coding block, wherein the forward transform kernel is different from an inverse transform kernel used to transform the residual block during decoding. In some embodiments, the inverse transform kernel / forward transform kernel may be a KLT matrix. In this case, an asymmetric transform is provided at the decoding side and the encoding side, respectively, in the present disclosure, wherein the forward transform and the inverse transform use different transform matrices.
[0291] In some embodiments, residual blocks with the same first attribute and different second attributes may have the same forward transform kernel and different inverse transform kernels. In some other embodiments, residual blocks with the same first attribute and different second attributes may have the same inverse transform kernel and different forward transform kernels.
[0292] In some embodiments, the first attribute may include a block size and the second attribute may include a quantization parameter or a quantization parameter range.
[0293] In some embodiments, the processor 1120 of the encoder may determine a forward transform kernel from a forward transform kernel set according to the property information of the residual block, wherein the forward transform kernel set is trained offline based on sample blocks collected offline.
[0294] In some embodiments, the forward transformation kernel set may be obtained by the device. Fig.15 As shown, the device may implement the following steps to train the forward transformation kernel set.
[0295] In step 1501, the device may collect sample blocks offline. In some embodiments of the present disclosure, the sample blocks may be residual blocks obtained offline based on original sample data to be encoded.
[0296] In step 1502 , the device may cluster the sample blocks into a plurality of block groups offline according to the attribute information of each sample block.
[0297] In step 1503, the device may train a forward transform kernel set offline based on a plurality of block groups, wherein the forward transform kernel set includes a plurality of inverse transform kernels corresponding to the plurality of block groups, respectively. For example, each forward transform kernel may be obtained by deriving a transformation matrix Ψ based on equations (5-7). The column vector of the transformation matrix Ψ is an eigenvector that may be obtained by performing eigenvalue decomposition or SVD on the covariance matrix Σ.
[0298] In some embodiments, the attribute information may include block size, and may also include any one or any combination of an adaptive motion vector resolution (AMVR) mode, an absolute value of a motion vector, a prediction mode, a neighboring template, a quantization parameter (QP) value, or a QP range for collecting each sample block.
[0299] In some embodiments, a device for video encoding and decoding is provided. The device includes a processor 1120 and a memory 1140 configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Figure 12-Figure 15 Any method shown.
[0300] In some other embodiments, a non-transitory computer-readable storage medium is provided, wherein instructions are stored. When the instructions are executed by the processor 1120, the instructions cause the processor to execute as follows Figure 12-Figure 15In one example, multiple programs may be executed by processor 1120 in computing environment 1110 to receive (e.g., from Figure 2A The video encoder 20 in the computing environment 1110 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1120 in the computing environment 1110 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1120 in the computing environment 1110 to perform the above-mentioned encoding method, encode the video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1120 in the computing environment 1110 to send a bitstream or data stream (e.g., to a Figure 3A Optionally, the non-transitory computer-readable storage medium may store therein a bitstream or data stream, the bitstream or data stream comprising the video decoder 30 in the encoder (e.g., Figure 2A The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 3A The video decoder 30 in the video decoder 30) in decoding the video data (e.g., video blocks representing encoded video frames and / or associated one or more syntax elements, etc.). The non-transitory computer-readable storage medium can be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0301] Other embodiments of the present disclosure will be apparent to those skilled in the art in view of the specification and practice of the present disclosure disclosed herein. This application is intended to cover any variation, use or adaptation of the present disclosure that follows the general principles of the present disclosure, and includes deviations from the present disclosure that fall within known or customary practices in the art. It is intended that the specification and embodiments are considered exemplary only.
[0302] It should be understood that the present disclosure is not limited to the exact embodiments described above and shown in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for video decoding, comprising: Determining, by the decoder, an inverse transform kernel for a residual block corresponding to a currently decoded block; as well as determining, by the decoder, a reconstructed block based on the inseparable transform kernel, the residual block and the current decoded block, The inverse transform kernel is different from the forward transform kernel used to transform the residual block during encoding.
2. The method according to claim 1, wherein: Residual blocks with the same first attribute and different second attributes have the same forward transform kernel and different inverse transform kernels.
3. The method according to claim 2, wherein: The first property comprises a block size and the second property comprises a quantization parameter or a quantization parameter range.
4. The method according to claim 1, wherein: Residual blocks with the same first property and different second properties have the same inverse transform kernel and different forward transform kernels. The method of claim 4 , wherein the first property comprises a block size and the second property comprises a quantization parameter or a quantization parameter range.
6. The method according to claim 1, wherein: The determining of an inverse transform kernel for a residual block corresponding to a current decoding block comprises: Determining the inverse transform kernel from an inverse transform kernel set according to the attribute information of the residual block, The inverse transform kernel set is trained offline based on sample blocks collected offline.
7. The method according to claim 6, wherein: The inverse transform kernel set is obtained through the following training steps: collecting the sample block offline by a device; The device clusters the sample blocks into a plurality of block groups offline according to the attribute information of each sample block; as well as Offline training of the inverse transform kernel set by the device based on the plurality of block groups; The inverse transform core set includes a plurality of inverse transform cores corresponding to the plurality of block groups respectively.
8. The method according to claim 7, wherein: The attribute information includes block size, and also includes any one or any combination of adaptive motion vector resolution AMVR mode, absolute value of motion vector, prediction mode, neighboring template, quantization parameter QP value or QP range for collecting each sample block.
9. The method according to claim 6, wherein: Residual blocks with the same block size and different quantization parameters or quantization parameter ranges have the same forward transform kernel and different inverse transform kernels, and The determining of an inverse transform kernel for a residual block corresponding to a current decoding block comprises: determining the inverse transform kernel from an inverse transform kernel set according to a quantization parameter or a quantization parameter range of the residual block, The inverse transform kernel set is trained offline based on sample blocks collected offline.
10. The method according to claim 9, wherein: The inverse transform kernel set is obtained through the following training steps: Collecting sample residual blocks and sample quantization transformation blocks offline by a device; The device clusters the sample residual blocks into a plurality of block groups offline according to a quantization parameter or a quantization parameter range of each sample residual block; as well as Offline training of the inverse transform kernel set by the device based on the plurality of block groups; The inverse transform core set includes a plurality of inverse transform cores corresponding to the plurality of block groups respectively.
11. A method for video encoding, comprising: The encoder determines the forward transform kernel for the residual block corresponding to the current coding block, The forward transform kernel is different from the inverse transform kernel used to transform the residual block during decoding.
12. The method according to claim 11, wherein: Residual blocks with the same first attribute and different second attributes have the same forward transform kernel and different inverse transform kernels.
13. The method according to claim 12, wherein: The first property comprises a block size and the second property comprises a quantization parameter or a quantization parameter range.
14. The method according to claim 11, wherein: Residual blocks with the same first property and different second properties have the same inverse transform kernel and different forward transform kernels.
15. The method according to claim 14, wherein: The first property comprises a block size and the second property comprises a quantization parameter or a quantization parameter range.
16. The method according to claim 11, wherein: The determining of a forward transform kernel for a residual block corresponding to a current coding block comprises: Determining the positive transformation kernel from the positive transformation kernel set according to the attribute information of the residual block, The forward transformation kernel set is trained offline based on sample blocks collected offline.
17. The method according to claim 16, wherein: The forward transformation kernel set is obtained through the following training steps: collecting the sample block offline by a device; The device clusters the sample blocks into a plurality of block groups offline according to the attribute information of each sample block; as well as Offline training of the forward transformation kernel set by the device based on the plurality of block groups; The forward transform core set includes a plurality of forward transform cores corresponding to the plurality of block groups respectively.
18. The method according to claim 17, wherein: The attribute information includes block size, and also includes any one or any combination of adaptive motion vector resolution AMVR mode, absolute value of motion vector, prediction mode, neighboring template, quantization parameter QP value or QP range for collecting each sample block.
19. A device comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein the one or more processors are configured to perform the method according to any one of claims 1-18 when executing the instructions.
20. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and perform the method of any one of claims 1-10 based on the bit stream.
21. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to any one of claims 11-18 to generate a bitstream and transmit the generated bitstream.
22. A bit stream, wherein the bit stream is to be decoded by a decoding method according to any one of claims 1-10.
23. A bit stream, wherein the bit stream is generated by the encoding method according to any one of claims 11-18.